projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36a4c72
)
ceph: compare fsc->max_file_size and inode->i_size for max file size limit
author
Chengguang Xu
<
[email protected]
>
Thu, 19 Jul 2018 14:15:27 +0000
(22:15 +0800)
committer
Ilya Dryomov
<
[email protected]
>
Mon, 13 Aug 2018 15:55:43 +0000
(17:55 +0200)
In ceph_llseek(), we compare fsc->max_file_size and inode->i_size to
choose max file size limit.
Signed-off-by: Chengguang Xu <
[email protected]
>
Reviewed-by: "Yan, Zheng" <
[email protected]
>
Signed-off-by: Ilya Dryomov <
[email protected]
>
fs/ceph/file.c
patch
|
blob
|
history
diff --git
a/fs/ceph/file.c
b/fs/ceph/file.c
index b9cd9d271dcbc62405db4867380694c898ee7ecb..141a64c1f3914c912728c2ab57e2bc7fcdf69719 100644
(file)
--- 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);