diff options
author | Hongbo Li <lihongbo22@huawei.com> | 2024-08-21 14:56:37 +0800 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2024-09-15 10:42:45 -0500 |
commit | 21dcbc17eba3cc8283747bc77e864ac7596b95ff (patch) | |
tree | 5a2768c8d6287eac35c09d99de15342e1ba3df85 /fs/smb/client/smb2file.c | |
parent | 2ba0d8947efd49d44babe7a2e72637c630fcfc42 (diff) |
smb: use LIST_HEAD() to simplify code
list_head can be initialized automatically with LIST_HEAD()
instead of calling INIT_LIST_HEAD(). No functional impact.
Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/smb2file.c')
-rw-r--r-- | fs/smb/client/smb2file.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/smb/client/smb2file.c b/fs/smb/client/smb2file.c index e6319f248816..e301349b0078 100644 --- a/fs/smb/client/smb2file.c +++ b/fs/smb/client/smb2file.c @@ -196,9 +196,7 @@ smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, struct cifsInodeInfo *cinode = CIFS_I(d_inode(cfile->dentry)); struct cifsLockInfo *li, *tmp; __u64 length = 1 + flock->fl_end - flock->fl_start; - struct list_head tmp_llist; - - INIT_LIST_HEAD(&tmp_llist); + LIST_HEAD(tmp_llist); /* * Accessing maxBuf is racy with cifs_reconnect - need to store value |