Skip to content

Commit f66f8b9

Browse files
Ronnie Sahlbergsmfrench
authored andcommitted
cifs: when extending a file with falloc we should make files not-sparse
as this is the only way to make sure the region is allocated. Fix the conditional that was wrong and only tried to make already non-sparse files non-sparse. Cc: [email protected] Signed-off-by: Ronnie Sahlberg <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 0d5106a commit f66f8b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/cifs/smb2ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3859,7 +3859,7 @@ static long smb3_simple_falloc(struct file *file, struct cifs_tcon *tcon,
38593859
if (rc)
38603860
goto out;
38613861

3862-
if ((cifsi->cifsAttrs & FILE_ATTRIBUTE_SPARSE_FILE) == 0)
3862+
if (cifsi->cifsAttrs & FILE_ATTRIBUTE_SPARSE_FILE)
38633863
smb2_set_sparse(xid, tcon, cfile, inode, false);
38643864

38653865
eof = cpu_to_le64(off + len);

0 commit comments

Comments
 (0)