Skip to content

Commit

Permalink
ext3: pass custom EOF to generic_file_llseek_size()
Browse files Browse the repository at this point in the history
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: Eric Sandeen <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Eric Sandeen authored and Al Viro committed Jul 22, 2012
1 parent ec7268c commit de9b942
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ext3/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,11 @@ loff_t ext3_dir_llseek(struct file *file, loff_t offset, int origin)
{
struct inode *inode = file->f_mapping->host;
int dx_dir = is_dx_dir(inode);
loff_t htree_max = ext3_get_htree_eof(file);

if (likely(dx_dir))
return generic_file_llseek_size(file, offset, origin,
ext3_get_htree_eof(file),
i_size_read(inode));
htree_max, htree_max);
else
return generic_file_llseek(file, offset, origin);
}
Expand Down

0 comments on commit de9b942

Please sign in to comment.