diff options
author | Jan Kara <jack@suse.cz> | 2016-03-09 23:03:27 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2016-03-09 23:03:27 -0500 |
commit | e3fb8eb14eafd2847c04cf48b52a705c36f4db98 (patch) | |
tree | df595ad9bd1be63bca5923955b2bb95a9f156c3f | |
parent | facab4d9711e7aa3532cb82643803e8f1b9518e8 (diff) |
ext4: cleanup handling of bh->b_state in DAX mmap
ext4_dax_mmap_get_block() updates bh->b_state directly instead of using
ext4_update_bh_state(). This is mostly a cosmetic issue since DAX code
always passes on-stack buffer_head but clean this up to make code more
uniform.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | fs/ext4/inode.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 1a156ec043a0..fddc6ddc53a8 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -3272,13 +3272,12 @@ out: | |||
3272 | WARN_ON_ONCE(ret == 0 && create); | 3272 | WARN_ON_ONCE(ret == 0 && create); |
3273 | if (ret > 0) { | 3273 | if (ret > 0) { |
3274 | map_bh(bh_result, inode->i_sb, map.m_pblk); | 3274 | map_bh(bh_result, inode->i_sb, map.m_pblk); |
3275 | bh_result->b_state = (bh_result->b_state & ~EXT4_MAP_FLAGS) | | ||
3276 | map.m_flags; | ||
3277 | /* | 3275 | /* |
3278 | * At least for now we have to clear BH_New so that DAX code | 3276 | * At least for now we have to clear BH_New so that DAX code |
3279 | * doesn't attempt to zero blocks again in a racy way. | 3277 | * doesn't attempt to zero blocks again in a racy way. |
3280 | */ | 3278 | */ |
3281 | bh_result->b_state &= ~(1 << BH_New); | 3279 | map.m_flags &= ~EXT4_MAP_NEW; |
3280 | ext4_update_bh_state(bh_result, map.m_flags); | ||
3282 | bh_result->b_size = map.m_len << inode->i_blkbits; | 3281 | bh_result->b_size = map.m_len << inode->i_blkbits; |
3283 | ret = 0; | 3282 | ret = 0; |
3284 | } | 3283 | } |