All of
 help / color / mirror / Atom feed
From: David Howells <>
To: Steve French <>
Cc:, Shyam Prasad N <>,
	Rohith Surabattula <>,
	Jeff Layton <>,
	Christian Brauner <>,,,,
Subject: [PATCH] cifs: Fix smb3_insert_range() to move the zero_point
Date: Wed, 22 May 2024 09:38:48 +0100	[thread overview]
Message-ID: <> (raw)

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: 3ee1a1fc3981 ("cifs: Cut over to using netfslib")
Signed-off-by: David Howells <>
cc: Steve French <>
cc: Shyam Prasad N <>
cc: Rohith Surabattula <>
cc: Jeff Layton <>
 fs/smb/client/smb2ops.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c
index ef18cd30f66c..b87b70edd0be 100644
--- a/fs/smb/client/smb2ops.c
+++ b/fs/smb/client/smb2ops.c
@@ -3636,6 +3636,7 @@ static long smb3_insert_range(struct file *file, struct cifs_tcon *tcon,
 	rc = smb2_copychunk_range(xid, cfile, cfile, off, count, off + len);
 	if (rc < 0)
 		goto out_2;
+	cifsi->netfs.zero_point = new_eof;
 	rc = smb3_zero_data(file, tcon, off, len, xid);
 	if (rc < 0)

             reply	other threads:[~2024-05-22  8:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-22  8:38 David Howells [this message]
2024-05-22  9:27 ` [PATCH] cifs: Fix smb3_insert_range() to move the zero_point Steve French

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.