diff mbox

[3/3] ext3: pass custom EOF to generic_file_llseek_size()

Message ID 4F9ED6E4.6050908@redhat.com
State Not Applicable, archived
Headers show

Commit Message

Eric Sandeen April 30, 2012, 6:16 p.m. UTC
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>
---



--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Jan Kara April 30, 2012, 10:10 p.m. UTC | #1
On Mon 30-04-12 13:16:04, Eric Sandeen wrote:
> 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>
  Looks good. I suppose you want to merge all three patches at once so:
Acked-by: Jan Kara <jack@suse.cz>

							Honza
> ---
> 
> diff --git a/fs/ext3/dir.c b/fs/ext3/dir.c
> index 92490e9..c8fff93 100644
> --- a/fs/ext3/dir.c
> +++ b/fs/ext3/dir.c
> @@ -300,10 +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));
> +					        htree_max, htree_max);
>  	else
>  		return generic_file_llseek(file, offset, origin);
>  }
> 
>
diff mbox

Patch

diff --git a/fs/ext3/dir.c b/fs/ext3/dir.c
index 92490e9..c8fff93 100644
--- a/fs/ext3/dir.c
+++ b/fs/ext3/dir.c
@@ -300,10 +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));
+					        htree_max, htree_max);
 	else
 		return generic_file_llseek(file, offset, origin);
 }