summaryrefslogtreecommitdiff
path: root/fs/ncpfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-03-07 22:17:07 -0500
committerSasha Levin <sasha.levin@oracle.com>2016-03-22 11:10:30 -0400
commit906e5a6e6e73316fa4741ca53be014c9477a100c (patch)
tree3078c5a072246c4c4426cccfd4e38a0df14c0e4c /fs/ncpfs
parent6d44ac3f884b220573b2d46c691127fb6fee0707 (diff)
ncpfs: fix a braino in OOM handling in ncp_fill_cache()
[ Upstream commit 803c00123a8012b3a283c0530910653973ef6d8f ] 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> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'fs/ncpfs')
-rw-r--r--fs/ncpfs/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c
index 80021c709af9..0c2632386f35 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 {