提交 de9b9422 编写于 作者: E Eric Sandeen 提交者: Al Viro

ext3: pass custom EOF to generic_file_llseek_size()

Use the new custom EOF argument to generic_file_llseek_size so
that SEEK_END will go to the max hash value for htree dirs
in ext3 rather than to i_size_read()
Signed-off-by: NEric Sandeen <sandeen@redhat.com>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 ec7268ce
...@@ -300,11 +300,11 @@ loff_t ext3_dir_llseek(struct file *file, loff_t offset, int origin) ...@@ -300,11 +300,11 @@ loff_t ext3_dir_llseek(struct file *file, loff_t offset, int origin)
{ {
struct inode *inode = file->f_mapping->host; struct inode *inode = file->f_mapping->host;
int dx_dir = is_dx_dir(inode); int dx_dir = is_dx_dir(inode);
loff_t htree_max = ext3_get_htree_eof(file);
if (likely(dx_dir)) if (likely(dx_dir))
return generic_file_llseek_size(file, offset, origin, return generic_file_llseek_size(file, offset, origin,
ext3_get_htree_eof(file), htree_max, htree_max);
i_size_read(inode));
else else
return generic_file_llseek(file, offset, origin); return generic_file_llseek(file, offset, origin);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册