[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1319974203-2625-3-git-send-email-xiaoqiangnk@gmail.com>
Date: Sun, 30 Oct 2011 19:30:03 +0800
From: Yongqiang Yang <xiaoqiangnk@...il.com>
To: tytso@....edu
Cc: linux-ext4@...r.kernel.org, Yongqiang Yang <xiaoqiangnk@...il.com>
Subject: [PATCH 3/3] ext4: let ext4_discard_partial_buffers handle unaligned range correctly
As comment says, we should handle unaligned range rather than aligned
one.
Signed-off-by: Yongqiang Yang <xiaoqiangnk@...il.com>
---
fs/ext4/inode.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index e113de8..f97d671 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3209,8 +3209,8 @@ int ext4_discard_partial_page_buffers_no_lock(handle_t *handle,
* to be updated with the contents of the block before
* we write the zeros on top of it.
*/
- if (!(from & (blocksize - 1)) ||
- !((from + length) & (blocksize - 1))) {
+ if ((from & (blocksize - 1)) ||
+ ((from + length) & (blocksize - 1))) {
create_empty_buffers(page, blocksize, 0);
} else {
/*
--
1.7.5.1
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists