diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 9f0ea3d3251b..5cde363cf7a8 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -353,6 +353,8 @@ static loff_t f2fs_llseek(struct file *file, loff_t offset, int whence) maxbytes, i_size_read(inode)); case SEEK_DATA: case SEEK_HOLE: + if (offset < 0) + return -ENXIO; return f2fs_seek_block(file, offset, whence); }