[Libguestfs] [PATCH 3/5] fuse: Fix cache invalidation in rename operation.

Matthew Booth mbooth at redhat.com
Tue Nov 17 18:06:42 UTC 2009


On 17/11/09 17:06, Richard W.M. Jones wrote:
>> From e94b78db7739e693460e7acfe7c76d295ee17dce Mon Sep 17 00:00:00 2001
> From: Richard Jones<rjones at redhat.com>
> Date: Tue, 17 Nov 2009 17:01:19 +0000
> Subject: [PATCH 3/5] fuse: Fix cache invalidation in rename operation.
>
> We need to invalidate both parameters, otherwise the old (moved)
> file can appear that it still exists after the move.
> ---
>   fuse/guestmount.c |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/fuse/guestmount.c b/fuse/guestmount.c
> index fe53822..9d16cef 100644
> --- a/fuse/guestmount.c
> +++ b/fuse/guestmount.c
> @@ -442,6 +442,7 @@ fg_rename (const char *from, const char *to)
>
>     if (read_only) return -EROFS;
>
> +  dir_cache_invalidate (from);
>     dir_cache_invalidate (to);
>
>     /* XXX It's not clear how close the 'mv' command is to the
> -- 1.6.5.2

ACK.

-- 
Matthew Booth, RHCA, RHCSS
Red Hat Engineering, Virtualisation Team

M:       +44 (0)7977 267231
GPG ID:  D33C3490
GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490




More information about the Libguestfs mailing list