summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2014-09-01 14:33:09 -0400
committerTheodore Ts'o <tytso@mit.edu>2014-09-01 14:33:09 -0400
commitbd30d702fc320085f178d22866b32fdc4736c991 (patch)
tree18ebc50354bcbf994ee0c400e7dc14cac7e6db6c /fs
parent713e8dde3e71e92db2d8cc8459d236ce1fb576ce (diff)
downloadlinux-rpi3-bd30d702fc320085f178d22866b32fdc4736c991.tar.gz
linux-rpi3-bd30d702fc320085f178d22866b32fdc4736c991.tar.bz2
linux-rpi3-bd30d702fc320085f178d22866b32fdc4736c991.zip
ext4: fix accidental flag aliasing in ext4_map_blocks flags
Commit b8a8684502a0f introduced an accidental flag aliasing between EXT4_EX_NOCACHE and EXT4_GET_BLOCKS_CONVERT_UNWRITTEN. Fortunately, this didn't introduce any untorward side effects --- we got lucky. Nevertheless, fix this and leave a warning to hopefully avoid this from happening in the future. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/ext4.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index cf3ad75d3015..550b4f99a843 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -569,6 +569,7 @@ enum {
#define EXT4_GET_BLOCKS_NO_PUT_HOLE 0x0200
/* Convert written extents to unwritten */
#define EXT4_GET_BLOCKS_CONVERT_UNWRITTEN 0x0400
+/* DO NOT ASSIGN ADDITIONAL FLAG VALUES WITHOUT ADJUSTING THE FLAGS BELOW */
/*
* The bit position of these flags must not overlap with any of the
@@ -579,8 +580,8 @@ enum {
* caching the extents when reading from the extent tree while a
* truncate or punch hole operation is in progress.
*/
-#define EXT4_EX_NOCACHE 0x0400
-#define EXT4_EX_FORCE_CACHE 0x0800
+#define EXT4_EX_NOCACHE 0x0800
+#define EXT4_EX_FORCE_CACHE 0x1000
/*
* Flags used by ext4_free_blocks