diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-03-07 22:17:07 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-03-07 22:25:16 -0500 |
commit | 803c00123a8012b3a283c0530910653973ef6d8f (patch) | |
tree | 71e816a7d78e5dc422917e9e13f47dfc6a5bfcc6 | |
parent | a528aca7f359f4b0b1d72ae406097e491a5ba9ea (diff) | |
download | op-kernel-dev-803c00123a8012b3a283c0530910653973ef6d8f.zip op-kernel-dev-803c00123a8012b3a283c0530910653973ef6d8f.tar.gz |
ncpfs: fix a braino in OOM handling in ncp_fill_cache()
Failing to allocate an inode for child means that cache for *parent* is
incompletely populated. So it's parent directory inode ('dir') that
needs NCPI_DIR_CACHE flag removed, *not* the child inode ('inode', which
is what we'd failed to allocate in the first place).
Fucked-up-in: commit 5e993e25 ("ncpfs: get rid of d_validate() nonsense")
Fucked-up-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@vger.kernel.org # v3.19
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/ncpfs/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c index 26c2de2..b7f8eae 100644 --- a/fs/ncpfs/dir.c +++ b/fs/ncpfs/dir.c @@ -633,7 +633,7 @@ ncp_fill_cache(struct file *file, struct dir_context *ctx, d_rehash(newdent); } else { spin_lock(&dentry->d_lock); - NCP_FINFO(inode)->flags &= ~NCPI_DIR_CACHE; + NCP_FINFO(dir)->flags &= ~NCPI_DIR_CACHE; spin_unlock(&dentry->d_lock); } } else { |