ext3: pass custom EOF to generic_file_llseek_size()
authorEric Sandeen <sandeen@redhat.com>
Mon, 30 Apr 2012 18:16:04 +0000 (13:16 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 22 Jul 2012 20:00:30 +0000 (00:00 +0400)
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 <sandeen@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ext3/dir.c

index 901f67e37864d5be4919e8816b9456444b73094d..c8fff930790d4eba76a0810c6e75fd7a85edce85 100644 (file)
@@ -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);
 }