VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Miklos Szeredi <mszeredi@redhat.com> 2019-01-24 10:40:17 +0100 committer: Miklos Szeredi <mszeredi@redhat.com> 2019-02-13 13:15:14 +0100 commit: 75126f5504524dd0f24753d8815db42d9ab23614 parent: eb98e3bdf3aa7b15b40c65063ea935f953f60c6b
Commit Summary:
fuse: use atomic64_t for khctr
Diffstat:
1 file changed, 1 insertion, 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;
 }