From: Namjae Jeon <linkinjeon@gmail.com>
To: jack@suse.cz
Cc: linux-kernel@vger.kernel.org, Namjae Jeon <linkinjeon@gmail.com>,
Namjae Jeon <namjae.jeon@samsung.com>,
Ashish Sangwan <a.sangwan@samsung.com>
Subject: [PATCH 6/6] udf: use extent cache when moving to last extent
Date: Wed, 10 Oct 2012 00:10:18 +0900 [thread overview]
Message-ID: <1349795418-6533-1-git-send-email-linkinjeon@gmail.com> (raw)
From: Namjae Jeon <namjae.jeon@samsung.com>
Use extent cache when moving to last extent.
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com>
---
fs/udf/truncate.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/udf/truncate.c b/fs/udf/truncate.c
index 8a9657d..95fd9bf 100644
--- a/fs/udf/truncate.c
+++ b/fs/udf/truncate.c
@@ -88,6 +88,8 @@ void udf_truncate_tail_extent(struct inode *inode)
adsize = sizeof(struct long_ad);
else
BUG();
+ if (!udf_read_extent_cache(inode, inode->i_size, &lbcount, &epos))
+ epos.block = iinfo->i_location;
/* Find the last extent in the file */
while ((netype = udf_next_aext(inode, &epos, &eloc, &elen, 1)) != -1) {
@@ -139,8 +141,8 @@ void udf_discard_prealloc(struct inode *inode)
adsize = sizeof(struct long_ad);
else
adsize = 0;
-
- epos.block = iinfo->i_location;
+ if (!udf_read_extent_cache(inode, inode->i_size, &lbcount, &epos))
+ epos.block = iinfo->i_location;
/* Find the last extent in the file */
while ((netype = udf_next_aext(inode, &epos, &eloc, &elen, 1)) != -1) {
--
1.7.9.5
reply other threads:[~2012-10-09 15:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1349795418-6533-1-git-send-email-linkinjeon@gmail.com \
--to=linkinjeon@gmail.com \
--cc=a.sangwan@samsung.com \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=namjae.jeon@samsung.com \
/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
all inboxes | Powered by JetHome®