mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-08-14 06:22:34 +02:00
fuse: drop redundant check in fuse_sync_bucket_alloc()
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>
This commit is contained in:
+3
-5
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user