diff options
author | Li Zefan <lizefan@huawei.com> | 2012-07-10 02:58:58 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-07-23 16:28:05 -0400 |
commit | 293f7e07405a63975cee4e95a2cfa0c17b34b3aa (patch) | |
tree | 33ce221bd3be09a834f7bfeee1a8d38e399510cd /fs/btrfs/delayed-inode.c | |
parent | b4d7c3c9456a311a45bc1ef8944b5ba5b176244f (diff) |
Btrfs: zero unused bytes in inode item
The otime field is not zeroed, so users will see random otime in an old
filesystem with a new kernel which has otime support in the future.
The reserved bytes are also not zeroed, and we'll have compatibility
issue if we make use of those bytes.
Signed-off-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'fs/btrfs/delayed-inode.c')
-rw-r--r-- | fs/btrfs/delayed-inode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index 21d91a8073ee..335605c8ceab 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c | |||
@@ -62,6 +62,7 @@ static inline void btrfs_init_delayed_node( | |||
62 | INIT_LIST_HEAD(&delayed_node->n_list); | 62 | INIT_LIST_HEAD(&delayed_node->n_list); |
63 | INIT_LIST_HEAD(&delayed_node->p_list); | 63 | INIT_LIST_HEAD(&delayed_node->p_list); |
64 | delayed_node->bytes_reserved = 0; | 64 | delayed_node->bytes_reserved = 0; |
65 | memset(&delayed_node->inode_item, 0, sizeof(delayed_node->inode_item)); | ||
65 | } | 66 | } |
66 | 67 | ||
67 | static inline int btrfs_is_continuous_delayed_item( | 68 | static inline int btrfs_is_continuous_delayed_item( |