From: Lukas Czerner <lczerner@redhat.com>
To: linux-ext4@vger.kernel.org
Cc: dan.carpenter@oracle.com, Lukas Czerner <lczerner@redhat.com>
Subject: [PATCH 1/2] ext4: Fix flag handling in ext4_split_convert_extents()
Date: Mon, 31 Mar 2014 11:11:33 +0200 [thread overview]
Message-ID: <1396257094-10386-1-git-send-email-lczerner@redhat.com> (raw)
In commit 1f0e51771281 "ext4: Introduce FALLOC_FL_ZERO_RANGE flag
for fallocate" we've introduced wrong flag handling. Fix it.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
fs/ext4/extents.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 243a02e..491208c 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -3644,13 +3644,13 @@ static int ext4_split_convert_extents(handle_t *handle,
ee_len = ext4_ext_get_actual_len(ex);
/* Convert to unwritten */
- if (flags | EXT4_GET_BLOCKS_CONVERT_UNWRITTEN) {
+ if (flags & EXT4_GET_BLOCKS_CONVERT_UNWRITTEN) {
split_flag |= EXT4_EXT_DATA_VALID1;
/* Convert to initialized */
- } else if (flags | EXT4_GET_BLOCKS_CONVERT) {
+ } else if (flags & EXT4_GET_BLOCKS_CONVERT) {
split_flag |= ee_block + ee_len <= eof_block ?
EXT4_EXT_MAY_ZEROOUT : 0;
- split_flag |= (EXT4_EXT_MARK_UNINIT2 & EXT4_EXT_DATA_VALID2);
+ split_flag |= (EXT4_EXT_MARK_UNINIT2 | EXT4_EXT_DATA_VALID2);
}
flags |= EXT4_GET_BLOCKS_PRE_IO;
return ext4_split_extent(handle, inode, path, map, split_flag, flags);
--
1.8.3.1
next reply other threads:[~2014-03-31 9:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-31 9:11 Lukas Czerner [this message]
2014-03-31 9:11 ` [PATCH 2/2] ext4: Remove unneeded test of ret variable Lukas Czerner
2014-04-01 5:00 ` Theodore Ts'o
2014-03-31 14:12 ` [PATCH 1/2] ext4: Fix flag handling in ext4_split_convert_extents() Dmitry Monakhov
2014-03-31 14:19 ` Dan Carpenter
2014-04-01 4:57 ` Theodore Ts'o
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=1396257094-10386-1-git-send-email-lczerner@redhat.com \
--to=lczerner@redhat.com \
--cc=dan.carpenter@oracle.com \
--cc=linux-ext4@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).