summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-11-17 17:02:15 +0000
committerRichard Jones <rjones@redhat.com>2009-11-17 17:47:47 +0000
commita15f118e3b2221e68732ad0545f770b3324d593b (patch)
treef0a7afc777a8283eac1bf7c3f1524082621c48a1
parent366339d41bc9af9d529f2118e1c971c49089d432 (diff)
downloadlibguestfs-a15f118e3b2221e68732ad0545f770b3324d593b.tar.gz
libguestfs-a15f118e3b2221e68732ad0545f770b3324d593b.tar.xz
libguestfs-a15f118e3b2221e68732ad0545f770b3324d593b.zip
fuse: Fix hard link creation.
The parameters were swapped. We also need to invalidate the cache for both parameters.
-rw-r--r--fuse/guestmount.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fuse/guestmount.c b/fuse/guestmount.c
index ce578c1b..ed8b08c1 100644
--- a/fuse/guestmount.c
+++ b/fuse/guestmount.c
@@ -461,9 +461,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 ();