Skip to content

Commit

Permalink
SEEK_DATA does require more than just return, actually.
Browse files Browse the repository at this point in the history
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
  • Loading branch information
rincebrain committed Mar 16, 2024
1 parent 938611a commit 1fca1e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion module/zfs/zfs_vnops.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
*/
int zfs_bclone_enabled = 1;


/*
* When set zfs_clone_range() waits for dirty data to be written to disk.
* This allows the clone operation to reliably succeed when a file is modified
Expand Down Expand Up @@ -182,6 +181,10 @@ zfs_holey(znode_t *zp, ulong_t cmd, loff_t *off)
/*
* F_SEEK_DATA, not modifying *off is "data here"
*/
else if (cmd == F_SEEK_DATA)
if (*off >= zp->z_size)
return (ENXIO);

return (0);
}

Expand Down

0 comments on commit 1fca1e2

Please sign in to comment.