All of lore.kernel.org
 help / color / mirror / Atom feed
* don't fetch the inode size beforehand.
@ 2011-08-26 13:32 Jeff Liu
  2011-09-06 14:15 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Liu @ 2011-08-26 13:32 UTC (permalink / raw)
  To: linux-btrfs

Hello,

I think we don't need to fetch the inode size in advance. :-P.

diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index e7872e4..f8ad957 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1698,7 +1698,7 @@ static int find_desired_extent(struct inode 
*inode, loff_t *offset, int origin)
      u64 lockend = i_size_read(inode);
      u64 start = *offset;
      u64 orig_start = *offset;
-    u64 len = i_size_read(inode);
+    u64 len;
      u64 last_end = 0;
      int ret = 0;


Thanks,
-Jeff

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: don't fetch the inode size beforehand.
  2011-08-26 13:32 don't fetch the inode size beforehand Jeff Liu
@ 2011-09-06 14:15 ` David Sterba
  0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2011-09-06 14:15 UTC (permalink / raw)
  To: Jeff Liu; +Cc: linux-btrfs

Hi,

On Fri, Aug 26, 2011 at 09:32:45PM +0800, Jeff Liu wrote:
> I think we don't need to fetch the inode size in advance. :-P.

yes, the value is not used and rewritten a few lines below anyway.
Please send a patch with proper header and signed-off line to be
accepted.

david


> 
> diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
> index e7872e4..f8ad957 100644
> --- a/fs/btrfs/file.c
> +++ b/fs/btrfs/file.c
> @@ -1698,7 +1698,7 @@ static int find_desired_extent(struct inode
> *inode, loff_t *offset, int origin)
>      u64 lockend = i_size_read(inode);
>      u64 start = *offset;
>      u64 orig_start = *offset;
> -    u64 len = i_size_read(inode);
> +    u64 len;
>      u64 last_end = 0;
>      int ret = 0;
> 
> 
> Thanks,
> -Jeff
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-06 14:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-26 13:32 don't fetch the inode size beforehand Jeff Liu
2011-09-06 14:15 ` David Sterba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.