[PATCH] PMFS: Initialize timestamps for new root inode

Vishal Verma vishal.l.verma at linux.intel.com
Thu Jun 6 16:04:21 EDT 2013


Reviewed-by: Vishal Verma <vishal.l.verma at linux.intel.com>

On Tue, 2013-06-04 at 11:39 -0600, Ross Zwisler wrote:
> When creating a new PMFS filesystem, initialize the timestamps for the
> new root inode.
> 
> Signed-off-by: Ross Zwisler <ross.zwisler at linux.intel.com>
> ---
>  fs/pmfs/super.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/pmfs/super.c b/fs/pmfs/super.c
> index 0f4780d..1e9d040 100644
> --- a/fs/pmfs/super.c
> +++ b/fs/pmfs/super.c
> @@ -484,6 +484,8 @@ static struct pmfs_inode *pmfs_init(struct super_block *sb,
>  	root_i->i_flags = 0;
>  	root_i->i_blocks = cpu_to_le32(1);
>  	root_i->i_size = cpu_to_le32(sb->s_blocksize);
> +	root_i->i_atime = root_i->i_mtime = root_i->i_ctime = 
> +		cpu_to_le32(get_seconds());
>  	root_i->root = cpu_to_le64(pmfs_get_block_off(sb, blocknr,
>  						       PMFS_BLOCK_TYPE_4K));
>  	root_i->height = 0;





More information about the Linux-pmfs mailing list