summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2010-05-31 22:43:54 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-06-01 00:23:54 -0700
commit91afbb094ce97fb8f8183227cd56410ad3746449 (patch)
treebf4f9d00440dce283a1ef080796e1afde24f1668 /xlators
parent7cda6661979dfec1614575a9729b84cbf49e6b25 (diff)
mount3: Handle <volname> as well for unmount dirpath
Till now nfsx would crash if the export was mounted simply as <volname> as compared to the traditional method of /<volname>. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 944 (vmware unmount crashes nfsx) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=944
Diffstat (limited to 'xlators')
-rw-r--r--xlators/nfs/server/src/mount3.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/nfs/server/src/mount3.c b/xlators/nfs/server/src/mount3.c
index c3792b314bd..d0b46147c25 100644
--- a/xlators/nfs/server/src/mount3.c
+++ b/xlators/nfs/server/src/mount3.c
@@ -517,7 +517,10 @@ __mnt3svc_umount (struct mount3_state *ms, char *dirpath, char *hostname)
return 0;
list_for_each_entry (me, &ms->mountlist, mlist) {
- exname = dirpath+1;
+ if (dirpath[0] == '/')
+ exname = dirpath+1;
+ else
+ exname = dirpath;
if ((strcmp (me->exname, exname) == 0) &&
(strcmp (me->hostname, hostname) == 0))
break;