linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Liu <jeff.liu@oracle.com>
To: linux-btrfs@vger.kernel.org
Subject: don't fetch the inode size beforehand.
Date: Fri, 26 Aug 2011 21:32:45 +0800	[thread overview]
Message-ID: <4E57A07D.7090306@oracle.com> (raw)

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

             reply	other threads:[~2011-08-26 13:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-26 13:32 Jeff Liu [this message]
2011-09-06 14:15 ` don't fetch the inode size beforehand David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E57A07D.7090306@oracle.com \
    --to=jeff.liu@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).