Skip to content

Commit 6c26f71

Browse files
author
Miklos Szeredi
committed
fuse: don't advise readdirplus for negative lookup
If the FUSE_READDIRPLUS_AUTO feature is enabled, then lookups on a directory before/during readdir are used as an indication that READDIRPLUS should be used instead of READDIR. However if the lookup turns out to be negative, then selecting READDIRPLUS makes no sense. Signed-off-by: Miklos Szeredi <[email protected]>
1 parent 2b319d1 commit 6c26f71

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/fuse/dir.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,8 @@ static struct dentry *fuse_lookup(struct inode *dir, struct dentry *entry,
405405
else
406406
fuse_invalidate_entry_cache(entry);
407407

408-
fuse_advise_use_readdirplus(dir);
408+
if (inode)
409+
fuse_advise_use_readdirplus(dir);
409410
return newent;
410411

411412
out_iput:

0 commit comments

Comments
 (0)