Message ID | 4E5C6009.6020908@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index e7872e4..082ae91 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1813,6 +1813,11 @@ static loff_t btrfs_file_llseek(struct file *file, loff_t offset, int origin) goto out; case SEEK_DATA: case SEEK_HOLE: + if (offset >= inode->i_size) { + mutex_unlock(&inode->i_mutex); + return -ENXIO; + } + ret = find_desired_extent(inode, &offset, origin); if (ret) {