|
@@ -112,6 +112,16 @@ void fuse_invalidate_attr(struct inode *inode)
|
|
|
get_fuse_inode(inode)->i_time = 0;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * Mark the attributes as stale due to an atime change. Avoid the invalidate if
|
|
|
+ * atime is not used.
|
|
|
+ */
|
|
|
+void fuse_invalidate_atime(struct inode *inode)
|
|
|
+{
|
|
|
+ if (!IS_RDONLY(inode))
|
|
|
+ fuse_invalidate_attr(inode);
|
|
|
+}
|
|
|
+
|
|
|
/*
|
|
|
* Just mark the entry as stale, so that a next attempt to look it up
|
|
|
* will result in a new lookup call to userspace
|
|
@@ -1371,7 +1381,7 @@ static int fuse_readdir(struct file *file, struct dir_context *ctx)
|
|
|
}
|
|
|
|
|
|
__free_page(page);
|
|
|
- fuse_invalidate_attr(inode); /* atime changed */
|
|
|
+ fuse_invalidate_atime(inode);
|
|
|
return err;
|
|
|
}
|
|
|
|
|
@@ -1404,7 +1414,7 @@ static char *read_link(struct dentry *dentry)
|
|
|
link[req->out.args[0].size] = '\0';
|
|
|
out:
|
|
|
fuse_put_request(fc, req);
|
|
|
- fuse_invalidate_attr(inode); /* atime changed */
|
|
|
+ fuse_invalidate_atime(inode);
|
|
|
return link;
|
|
|
}
|
|
|
|