Skip to content

Commit

Permalink
NAS-130052 / 24.10 / Fix regression in stream truncation (#183)
Browse files Browse the repository at this point in the history
Upstream commit 6ebfede changed
API for SMB2_set_eof() which introduced regression in truncation
of SMB alternate data streams.
  • Loading branch information
anodos325 authored and usaleem-ix committed Oct 30, 2024
1 parent b6a47df commit 6ceffca
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/smb/client/truenas_streams.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,8 @@ write_stream(struct dentry *dentry, struct cifs_tcon *tcon,

if (total_written < le64_to_cpu(info.EndOfFile)) {
int err;
__le64 eof = cpu_to_le64(total_written);
err = SMB2_set_eof(xid, tcon, fid.persistent_fid,
fid.volatile_fid, current->tgid, &eof);
fid.volatile_fid, current->tgid, total_written);
}

server->ops->close(xid, tcon, &fid);
Expand Down

0 comments on commit 6ceffca

Please sign in to comment.