aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r--fs/fuse/dir.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 254df56b847b..f3f783dc4f75 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -180,6 +180,8 @@ u64 fuse_get_attr_version(struct fuse_conn *fc)
180static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags) 180static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)
181{ 181{
182 struct inode *inode; 182 struct inode *inode;
183 struct dentry *parent;
184 struct fuse_conn *fc;
183 185
184 inode = ACCESS_ONCE(entry->d_inode); 186 inode = ACCESS_ONCE(entry->d_inode);
185 if (inode && is_bad_inode(inode)) 187 if (inode && is_bad_inode(inode))
@@ -187,10 +189,8 @@ static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)
187 else if (fuse_dentry_time(entry) < get_jiffies_64()) { 189 else if (fuse_dentry_time(entry) < get_jiffies_64()) {
188 int err; 190 int err;
189 struct fuse_entry_out outarg; 191 struct fuse_entry_out outarg;
190 struct fuse_conn *fc;
191 struct fuse_req *req; 192 struct fuse_req *req;
192 struct fuse_forget_link *forget; 193 struct fuse_forget_link *forget;
193 struct dentry *parent;
194 u64 attr_version; 194 u64 attr_version;
195 195
196 /* For negative dentries, always do a fresh lookup */ 196 /* For negative dentries, always do a fresh lookup */
@@ -241,8 +241,14 @@ static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)
241 entry_attr_timeout(&outarg), 241 entry_attr_timeout(&outarg),
242 attr_version); 242 attr_version);
243 fuse_change_entry_timeout(entry, &outarg); 243 fuse_change_entry_timeout(entry, &outarg);
244 } else if (inode) {
245 fc = get_fuse_conn(inode);
246 if (fc->readdirplus_auto) {
247 parent = dget_parent(entry);
248 fuse_advise_use_readdirplus(parent->d_inode);
249 dput(parent);
250 }
244 } 251 }
245 fuse_advise_use_readdirplus(inode);
246 return 1; 252 return 1;
247} 253}
248 254