Skip to content

Commit

Permalink
Fix regression in stream truncation
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 committed Jul 15, 2024
1 parent c3df8d9 commit 659811a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/smb/client/truenas_streams.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,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 659811a

Please sign in to comment.