summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2015-07-01 16:26:00 +0200
committerMiklos Szeredi <mszeredi@suse.cz>2015-07-01 16:26:00 +0200
commit7d2e0a099c7685a7355c27a2c3dc76ea7cfc8283 (patch)
tree12805b4313b11be405a4f1cc0229a5006635cf95 /fs
parent41f982747e8175a4eb5e8d1939bdbb10f435b7f6 (diff)
downloadop-kernel-dev-7d2e0a099c7685a7355c27a2c3dc76ea7cfc8283.zip
op-kernel-dev-7d2e0a099c7685a7355c27a2c3dc76ea7cfc8283.tar.gz
fuse: simplify unique ctr
Since it's a 64bit counter, it's never gonna wrap around. Remove code dealing with that possibility. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Reviewed-by: Ashish Samant <ashish.samant@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/fuse/dev.c7
-rw-r--r--fs/fuse/inode.c1
2 files changed, 1 insertions, 7 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 6cb0b0b..2014cee 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -319,12 +319,7 @@ static unsigned len_args(unsigned numargs, struct fuse_arg *args)
static u64 fuse_get_unique(struct fuse_conn *fc)
{
- fc->reqctr++;
- /* zero is special */
- if (fc->reqctr == 0)
- fc->reqctr = 1;
-
- return fc->reqctr;
+ return ++fc->reqctr;
}
static void queue_request(struct fuse_conn *fc, struct fuse_req *req)
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index f7c9b72..2f902b8 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -588,7 +588,6 @@ void fuse_conn_init(struct fuse_conn *fc)
fc->congestion_threshold = FUSE_DEFAULT_CONGESTION_THRESHOLD;
fc->khctr = 0;
fc->polled_files = RB_ROOT;
- fc->reqctr = 0;
fc->blocked = 0;
fc->initialized = 0;
fc->attr_version = 1;
OpenPOWER on IntegriCloud