diff options
Diffstat (limited to 'fs/ubifs')
-rw-r--r-- | fs/ubifs/dir.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index 0d1ab8967a4c..5c96f1fb7016 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c | |||
@@ -219,15 +219,7 @@ static struct dentry *ubifs_lookup(struct inode *dir, struct dentry *dentry, | |||
219 | 219 | ||
220 | err = ubifs_tnc_lookup_nm(c, &key, dent, &dentry->d_name); | 220 | err = ubifs_tnc_lookup_nm(c, &key, dent, &dentry->d_name); |
221 | if (err) { | 221 | if (err) { |
222 | /* | 222 | if (err == -ENOENT) { |
223 | * Do not hash the direntry if parent 'i_nlink' is zero, because | ||
224 | * this has side-effects - '->delete_inode()' call will not be | ||
225 | * called for the parent orphan inode, because 'd_count' of its | ||
226 | * direntry will stay 1 (it'll be negative direntry I guess) | ||
227 | * and prevent 'iput_final()' until the dentry is destroyed due | ||
228 | * to unmount or memory pressure. | ||
229 | */ | ||
230 | if (err == -ENOENT && dir->i_nlink != 0) { | ||
231 | dbg_gen("not found"); | 223 | dbg_gen("not found"); |
232 | goto done; | 224 | goto done; |
233 | } | 225 | } |