diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2019-01-24 12:40:17 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2019-02-13 15:15:14 +0300 |
commit | 75126f5504524dd0f24753d8815db42d9ab23614 (patch) | |
tree | ec0cde9b5ec4fab5037f7ce702ac81e3da6d0eb7 /fs/fuse/file.c | |
parent | eb98e3bdf3aa7b15b40c65063ea935f953f60c6b (diff) | |
download | linux-75126f5504524dd0f24753d8815db42d9ab23614.tar.xz |
fuse: use atomic64_t for khctr
...to get rid of one more fc->lock use.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/file.c')
-rw-r--r-- | fs/fuse/file.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 26c2523120bc..b2a4fab08cb4 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -64,9 +64,7 @@ struct fuse_file *fuse_file_alloc(struct fuse_conn *fc) RB_CLEAR_NODE(&ff->polled_node); init_waitqueue_head(&ff->poll_wait); - spin_lock(&fc->lock); - ff->kh = ++fc->khctr; - spin_unlock(&fc->lock); + ff->kh = atomic64_inc_return(&fc->khctr); return ff; } |