]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
smb/client: name the default fallocate mode
authorHuiwen He <hehuiwen@kylinos.cn>
Tue, 23 Jun 2026 02:46:13 +0000 (10:46 +0800)
committerSteve French <stfrench@microsoft.com>
Wed, 24 Jun 2026 15:33:51 +0000 (10:33 -0500)
FALLOC_FL_ALLOCATE_RANGE identifies the default fallocate
allocation mode and is defined as zero.

Use the symbolic name instead of a literal zero in
smb3_fallocate() to make the mode dispatch clearer. This
does not change behavior.

Signed-off-by: Huiwen He <hehuiwen@kylinos.cn>
Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smb2ops.c

index a8f8feeeccb5edaf84b157b6d6228f86cc6d68d5..2964f461fc847714571f6dac24616c0bc7f970ef 100644 (file)
@@ -4071,7 +4071,7 @@ static long smb3_fallocate(struct file *file, struct cifs_tcon *tcon, int mode,
                return smb3_collapse_range(file, tcon, off, len);
        else if (mode == FALLOC_FL_INSERT_RANGE)
                return smb3_insert_range(file, tcon, off, len);
-       else if (mode == 0)
+       else if (mode == FALLOC_FL_ALLOCATE_RANGE)
                return smb3_simple_falloc(file, tcon, off, len, false);
 
        return -EOPNOTSUPP;