summaryrefslogtreecommitdiff
path: root/fs/fuse/dev.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2015-07-01 17:26:00 +0300
committerMiklos Szeredi <mszeredi@suse.cz>2015-07-01 17:26:00 +0300
commit7d2e0a099c7685a7355c27a2c3dc76ea7cfc8283 (patch)
tree12805b4313b11be405a4f1cc0229a5006635cf95 /fs/fuse/dev.c
parent41f982747e8175a4eb5e8d1939bdbb10f435b7f6 (diff)
downloadlinux-7d2e0a099c7685a7355c27a2c3dc76ea7cfc8283.tar.xz
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/fuse/dev.c')
-rw-r--r--fs/fuse/dev.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 6cb0b0bc9029..2014cee76036 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)