mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 15:20:58 +07:00
ceph: compare fsc->max_file_size and inode->i_size for max file size limit
In ceph_llseek(), we compare fsc->max_file_size and inode->i_size to choose max file size limit. Signed-off-by: Chengguang Xu <cgxu519@gmx.com> Reviewed-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
parent
36a4c72d1c
commit
9da12e3a7d
@ -1554,6 +1554,7 @@ static ssize_t ceph_write_iter(struct kiocb *iocb, struct iov_iter *from)
|
||||
static loff_t ceph_llseek(struct file *file, loff_t offset, int whence)
|
||||
{
|
||||
struct inode *inode = file->f_mapping->host;
|
||||
struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
|
||||
loff_t i_size;
|
||||
loff_t ret;
|
||||
|
||||
@ -1598,7 +1599,7 @@ static loff_t ceph_llseek(struct file *file, loff_t offset, int whence)
|
||||
break;
|
||||
}
|
||||
|
||||
ret = vfs_setpos(file, offset, inode->i_sb->s_maxbytes);
|
||||
ret = vfs_setpos(file, offset, max(i_size, fsc->max_file_size));
|
||||
|
||||
out:
|
||||
inode_unlock(inode);
|
||||
|
Loading…
Reference in New Issue
Block a user