diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2019-10-21 16:57:07 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2019-10-21 16:57:07 +0300 |
commit | 6c26f71759a6efc04b888dd2c1cc4f1cac38cdf0 (patch) | |
tree | 33b74a968abe41628e510709d986fcb6f544681e /fs | |
parent | 2b319d1f6f92a4ced9897678113d176ee16ae85d (diff) | |
download | linux-6c26f71759a6efc04b888dd2c1cc4f1cac38cdf0.tar.xz |
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 <mszeredi@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fuse/dir.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index d572c900bb0f..b77954a27538 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -405,7 +405,8 @@ static struct dentry *fuse_lookup(struct inode *dir, struct dentry *entry, else fuse_invalidate_entry_cache(entry); - fuse_advise_use_readdirplus(dir); + if (inode) + fuse_advise_use_readdirplus(dir); return newent; out_iput: |