[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 2/5] fuse: Fix hard link creation.



-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
>From f5eec5299fc97de6bb094f23e36dace83fb46363 Mon Sep 17 00:00:00 2001
From: Richard Jones <rjones redhat com>
Date: Tue, 17 Nov 2009 17:02:15 +0000
Subject: [PATCH 2/5] fuse: Fix hard link creation.

The parameters were swapped.  We also need to invalidate the
cache for both parameters.
---
 fuse/guestmount.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fuse/guestmount.c b/fuse/guestmount.c
index 8e081a6..fe53822 100644
--- a/fuse/guestmount.c
+++ b/fuse/guestmount.c
@@ -462,9 +462,10 @@ fg_link (const char *from, const char *to)
 
   if (read_only) return -EROFS;
 
+  dir_cache_invalidate (from);
   dir_cache_invalidate (to);
 
-  r = guestfs_ln (g, to, from);
+  r = guestfs_ln (g, from, to);
   if (r == -1)
     return error ();
 
-- 
1.6.5.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]