mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +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:
parent
fde04c3d6f
commit
d3aa89c9bf
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user