From 126d0fa7333c0d6d6159900d2858c82fa964b4f9 Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Fri, 26 Apr 2019 02:17:28 +0900 Subject: Use SEEK_{SET,CUR,END} for file seek "whence" Use either SEEK_* or 0,1,2..., but not both. Reviewed-by: George Melikov Reviewed-by: Brian Behlendorf Signed-off-by: Tomohiro Kusumi Closes #8656 --- module/zfs/zpl_inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/zfs/zpl_inode.c') diff --git a/module/zfs/zpl_inode.c b/module/zfs/zpl_inode.c index 41b91cabc..720330a8b 100644 --- a/module/zfs/zpl_inode.c +++ b/module/zfs/zpl_inode.c @@ -636,7 +636,7 @@ zpl_truncate_range(struct inode *ip, loff_t start, loff_t end) crhold(cr); bf.l_type = F_WRLCK; - bf.l_whence = 0; + bf.l_whence = SEEK_SET; bf.l_start = start; bf.l_len = end - start; bf.l_pid = 0; -- cgit v1.2.3