]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
fuse: drop redundant check in fuse_sync_bucket_alloc()
authorLi Wang <liwang@kylinos.cn>
Tue, 21 Apr 2026 03:38:16 +0000 (11:38 +0800)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 15 Jun 2026 12:06:18 +0000 (14:06 +0200)
kzalloc_obj with __GFP_NOFAIL is documented to never return failure,
and checking for NULL is redundant (__GFP_NOFAIL in gfp_types.h).

Signed-off-by: Li Wang <liwang@kylinos.cn>
Reviewed-by: Joanne Koong <joannelkoong@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/inode.c

index 438d5211222c4eceda31f0e26ce4c16efa5941ed..c3689f4f7beb83acb52f4836b9039ded9de23bce 100644 (file)
@@ -676,11 +676,9 @@ static struct fuse_sync_bucket *fuse_sync_bucket_alloc(void)
        struct fuse_sync_bucket *bucket;
 
        bucket = kzalloc_obj(*bucket, GFP_KERNEL | __GFP_NOFAIL);
-       if (bucket) {
-               init_waitqueue_head(&bucket->waitq);
-               /* Initial active count */
-               atomic_set(&bucket->count, 1);
-       }
+       init_waitqueue_head(&bucket->waitq);
+       /* Initial active count */
+       atomic_set(&bucket->count, 1);
        return bucket;
 }