* [PATCH] ext4: don't leave i_crtime.tv_sec uninitialized
@ 2014-02-17 0:31 Theodore Ts'o
2014-02-17 10:31 ` Vegard Nossum
0 siblings, 1 reply; 2+ messages in thread
From: Theodore Ts'o @ 2014-02-17 0:31 UTC (permalink / raw)
To: Ext4 Developers List; +Cc: Vegard Nossum, Theodore Ts'o
If the i_crtime field is not present in the inode, don't leave the
field uninitialized.
Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
fs/ext4/ext4.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index ece5556..d3a534f 100644
--- 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); \
--
1.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ext4: don't leave i_crtime.tv_sec uninitialized
2014-02-17 0:31 [PATCH] ext4: don't leave i_crtime.tv_sec uninitialized Theodore Ts'o
@ 2014-02-17 10:31 ` Vegard Nossum
0 siblings, 0 replies; 2+ messages in thread
From: Vegard Nossum @ 2014-02-17 10:31 UTC (permalink / raw)
To: Theodore Ts'o, Ext4 Developers List
On 02/17/2014 01:31 AM, Theodore Ts'o wrote:
> If the i_crtime field is not present in the inode, don't leave the
> field uninitialized.
>
> Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
> ---
> fs/ext4/ext4.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> index ece5556..d3a534f 100644
> --- 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); \
>
This fixes everything for me, thanks!
Vegard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-17 10:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-17 0:31 [PATCH] ext4: don't leave i_crtime.tv_sec uninitialized Theodore Ts'o
2014-02-17 10:31 ` Vegard Nossum
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).