mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
bcachefs: Fix bch2_seek_data()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
99aaf57000
commit
e10d309471
1 changed files with 2 additions and 2 deletions
|
@ -2798,7 +2798,7 @@ static loff_t bch2_next_pagecache_data(struct inode *vinode,
|
|||
end_offset =
|
||||
min(end_offset,
|
||||
max(start_offset,
|
||||
((loff_t) index) << PAGE_SHIFT));
|
||||
((loff_t) folio->index) << PAGE_SHIFT));
|
||||
folio_unlock(folio);
|
||||
folio_batch_release(&fbatch);
|
||||
return end_offset;
|
||||
|
@ -2847,7 +2847,7 @@ static loff_t bch2_seek_data(struct file *file, u64 offset)
|
|||
next_data = bch2_next_pagecache_data(&inode->v,
|
||||
offset, next_data);
|
||||
|
||||
if (next_data > isize)
|
||||
if (next_data >= isize)
|
||||
return -ENXIO;
|
||||
|
||||
return vfs_setpos(file, next_data, MAX_LFS_FILESIZE);
|
||||
|
|
Loading…
Reference in a new issue