* [PATCH] cifs: when extending a file with falloc we should make files not-sparse
@ 2022-05-31 22:48 Ronnie Sahlberg
2022-05-31 22:58 ` Steve French
0 siblings, 1 reply; 2+ messages in thread
From: Ronnie Sahlberg @ 2022-05-31 22:48 UTC (permalink / raw)
To: linux-cifs; +Cc: Steve French
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.
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
---
fs/cifs/smb2ops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index d7ade739cde1..03ab28c341c4 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -3859,7 +3859,7 @@ static long smb3_simple_falloc(struct file *file, struct cifs_tcon *tcon,
if (rc)
goto out;
- if ((cifsi->cifsAttrs & FILE_ATTRIBUTE_SPARSE_FILE) == 0)
+ if (cifsi->cifsAttrs & FILE_ATTRIBUTE_SPARSE_FILE)
smb2_set_sparse(xid, tcon, cfile, inode, false);
eof = cpu_to_le64(off + len);
--
2.35.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cifs: when extending a file with falloc we should make files not-sparse
2022-05-31 22:48 [PATCH] cifs: when extending a file with falloc we should make files not-sparse Ronnie Sahlberg
@ 2022-05-31 22:58 ` Steve French
0 siblings, 0 replies; 2+ messages in thread
From: Steve French @ 2022-05-31 22:58 UTC (permalink / raw)
To: Ronnie Sahlberg; +Cc: linux-cifs
will merge to cifs-2.6.git for-next and cc:stable
On Tue, May 31, 2022 at 3:48 PM Ronnie Sahlberg <lsahlber@redhat.com> wrote:
>
> 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.
>
> Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
> ---
> fs/cifs/smb2ops.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> index d7ade739cde1..03ab28c341c4 100644
> --- a/fs/cifs/smb2ops.c
> +++ b/fs/cifs/smb2ops.c
> @@ -3859,7 +3859,7 @@ static long smb3_simple_falloc(struct file *file, struct cifs_tcon *tcon,
> if (rc)
> goto out;
>
> - if ((cifsi->cifsAttrs & FILE_ATTRIBUTE_SPARSE_FILE) == 0)
> + if (cifsi->cifsAttrs & FILE_ATTRIBUTE_SPARSE_FILE)
> smb2_set_sparse(xid, tcon, cfile, inode, false);
>
> eof = cpu_to_le64(off + len);
> --
> 2.35.3
>
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-31 22:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-31 22:48 [PATCH] cifs: when extending a file with falloc we should make files not-sparse Ronnie Sahlberg
2022-05-31 22:58 ` Steve French
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.