summaryrefslogtreecommitdiff
path: root/source3/smbd/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/fileio.c')
-rw-r--r--source3/smbd/fileio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c
index aec6554436..da40013bc5 100644
--- a/source3/smbd/fileio.c
+++ b/source3/smbd/fileio.c
@@ -128,7 +128,8 @@ static ssize_t real_write_file(struct smb_request *req,
ret = vfs_write_data(req, fsp, data, n);
} else {
fsp->fh->pos = pos;
- if (pos && lp_strict_allocate(SNUM(fsp->conn))) {
+ if (pos && lp_strict_allocate(SNUM(fsp->conn) &&
+ !fsp->is_sparse)) {
if (vfs_fill_sparse(fsp, pos) == -1) {
return -1;
}