mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]>
Cc: [email protected] # v3.19
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
a528aca7f3
commit
803c00123a
1 changed files with 1 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue