From 91afbb094ce97fb8f8183227cd56410ad3746449 Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Mon, 31 May 2010 22:43:54 +0000 Subject: mount3: Handle as well for unmount dirpath Till now nfsx would crash if the export was mounted simply as as compared to the traditional method of /. Signed-off-by: Shehjar Tikoo Signed-off-by: Anand V. Avati BUG: 944 (vmware unmount crashes nfsx) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=944 --- xlators/nfs/server/src/mount3.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'xlators') 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; -- cgit