Skip to content

Commit 8a16072

Browse files
dhowellsSteve French
authored andcommitted
cifs: Fix smb3_insert_range() to move the zero_point
Fix smb3_insert_range() to move the zero_point over to the new EOF. Without this, generic/147 fails as reads of data beyond the old EOF point return zeroes. Fixes: 3ee1a1f ("cifs: Cut over to using netfslib") Signed-off-by: David Howells <[email protected]> cc: Shyam Prasad N <[email protected]> cc: Rohith Surabattula <[email protected]> cc: Jeff Layton <[email protected]> cc: [email protected] cc: [email protected] Signed-off-by: Steve French <[email protected]>
1 parent 10c623a commit 8a16072

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/smb/client/smb2ops.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3636,6 +3636,7 @@ static long smb3_insert_range(struct file *file, struct cifs_tcon *tcon,
36363636
rc = smb2_copychunk_range(xid, cfile, cfile, off, count, off + len);
36373637
if (rc < 0)
36383638
goto out_2;
3639+
cifsi->netfs.zero_point = new_eof;
36393640

36403641
rc = smb3_zero_data(file, tcon, off, len, xid);
36413642
if (rc < 0)

0 commit comments

Comments
 (0)