diff options
author | Chengguang Xu <cgxu519@gmx.com> | 2018-07-19 22:15:27 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2018-08-13 17:55:43 +0200 |
commit | 9da12e3a7de1665a14063653b60e872da0ee7810 (patch) | |
tree | 50aa30146497e8ace171bbbbac5fbc50e2d9338a /fs/ceph/file.c | |
parent | 36a4c72d1c6f5f50d4db14a38f296855ae82571b (diff) | |
download | linux-9da12e3a7de1665a14063653b60e872da0ee7810.tar.bz2 |
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>
Diffstat (limited to 'fs/ceph/file.c')
-rw-r--r-- | fs/ceph/file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index b9cd9d271dcb..141a64c1f391 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -1554,6 +1554,7 @@ out_unlocked: 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); |