diff options
author | Kirill Tkhai <ktkhai@virtuozzo.com> | 2018-11-09 13:33:17 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2019-02-13 13:15:13 +0100 |
commit | 4510d86fbbb36872224482bb21836d47cce8be8c (patch) | |
tree | d4340b770fd1f73d14c5391f407b50b00b946f2b /fs/fuse/fuse_i.h | |
parent | ebf84d0c7220c7c9b904c405e61175d2a50cfb39 (diff) |
fuse: Convert fc->attr_version into atomic64_t
This patch makes fc->attr_version of atomic64_t type, so fc->lock won't be
needed to read or modify it anymore.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/fuse_i.h')
-rw-r--r-- | fs/fuse/fuse_i.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index 1b536b6c20f9..47c7b2238f91 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -730,7 +730,7 @@ struct fuse_conn { struct fuse_req *destroy_req; /** Version counter for attribute changes */ - u64 attr_version; + atomic64_t attr_version; /** Called on final put */ void (*release)(struct fuse_conn *); @@ -770,6 +770,11 @@ static inline int invalid_nodeid(u64 nodeid) return !nodeid || nodeid == FUSE_ROOT_ID; } +static inline u64 fuse_get_attr_version(struct fuse_conn *fc) +{ + return atomic64_read(&fc->attr_version); +} + /** Device operations */ extern const struct file_operations fuse_dev_operations; @@ -1000,8 +1005,6 @@ void fuse_flush_writepages(struct inode *inode); void fuse_set_nowrite(struct inode *inode); void fuse_release_nowrite(struct inode *inode); -u64 fuse_get_attr_version(struct fuse_conn *fc); - /** * File-system tells the kernel to invalidate cache for the given node id. */ |