[Ocfs2-tools-devel] [PATCH 2/2] Libocfs2: Set dtime in ocfs2_delete_inode()

Sunil Mushran sunil.mushran at oracle.com
Tue Mar 23 20:47:46 PDT 2010


Looks good

On Mar 23, 2010, at 6:50 PM, Tristan Ye <tristan.ye at oracle.com> wrote:

> Aside from setting dtime, we also clear ORPHAN_FL flag to keep
> the same as kernel part.
>
> Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
> ---
> libocfs2/alloc.c |    3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/libocfs2/alloc.c b/libocfs2/alloc.c
> index 96c4fc1..842ebdb 100644
> --- a/libocfs2/alloc.c
> +++ b/libocfs2/alloc.c
> @@ -346,7 +346,8 @@ errcode_t ocfs2_delete_inode(ocfs2_filesys *fs,  
> uint64_t ino)
>    if (ret)
>        goto out;
>
> -    di->i_flags &= ~OCFS2_VALID_FL;
> +    di->i_flags &= ~(OCFS2_VALID_FL | OCFS2_ORPHANED_FL);
> +    di->i_dtime = time(NULL);
>    ret = ocfs2_write_inode(fs, di->i_blkno, buf);
>
> out:
> -- 
> 1.5.5
>
>
> _______________________________________________
> Ocfs2-tools-devel mailing list
> Ocfs2-tools-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel



More information about the Ocfs2-tools-devel mailing list