projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d2660d
)
ext4: don't leave i_crtime.tv_sec uninitialized
author
Theodore Ts'o
<
[email protected]
>
Mon, 17 Feb 2014 00:29:32 +0000
(19:29 -0500)
committer
Theodore Ts'o
<
[email protected]
>
Mon, 17 Feb 2014 00:29:32 +0000
(19:29 -0500)
If the i_crtime field is not present in the inode, don't leave the
field uninitialized.
Fixes: ef7f38359 ("ext4: Add nanosecond timestamps")
Reported-by: Vegard Nossum <
[email protected]
>
Tested-by: Vegard Nossum <
[email protected]
>
Signed-off-by: "Theodore Ts'o" <
[email protected]
>
Cc:
[email protected]
fs/ext4/ext4.h
patch
|
blob
|
history
diff --git
a/fs/ext4/ext4.h
b/fs/ext4/ext4.h
index ece55565b9cd35575c454d44656c63321d89e0f9..d3a534fdc5ff6c766131e5d843591149736cc4d8 100644
(file)
--- a/
fs/ext4/ext4.h
+++ b/
fs/ext4/ext4.h
@@
-771,6
+771,8
@@
do { \
if (EXT4_FITS_IN_INODE(raw_inode, einode, xtime)) \
(einode)->xtime.tv_sec = \
(signed)le32_to_cpu((raw_inode)->xtime); \
+ else \
+ (einode)->xtime.tv_sec = 0; \
if (EXT4_FITS_IN_INODE(raw_inode, einode, xtime ## _extra)) \
ext4_decode_extra_time(&(einode)->xtime, \
raw_inode->xtime ## _extra); \