diff options
| author | Li Wang <liwang@kylinos.cn> | 2026-04-21 11:38:16 +0800 |
|---|---|---|
| committer | Miklos Szeredi <mszeredi@redhat.com> | 2026-06-15 14:06:18 +0200 |
| commit | d3aa89c9bfb7cd72a7025ebbb92275128d28afbd (patch) | |
| tree | 2d4cba70ccd6564ccb03d312f03ef9fa79708e20 /fs | |
| parent | fde04c3d6f2bbc5c8fe25c99fd640f57e1e80d10 (diff) | |
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>
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/fuse/inode.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 438d5211222c..c3689f4f7beb 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -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; } |
