lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1341717459-7297-1-git-send-email-linkinjeon@gmail.com>
Date:	Sat,  7 Jul 2012 23:17:39 -0400
From:	Namjae Jeon <linkinjeon@...il.com>
To:	SteveD@...hat.com, bfields@...ldses.org, Trond.Myklebust@...app.com
Cc:	linux-nfs@...r.kernel.org, linux-kernel@...r.kernel.org,
	Namjae Jeon <linkinjeon@...il.com>,
	Vivek Trivedi <vtrivedi018@...il.com>
Subject: [PATCH] nfs-util: Add cache_flush in mountd UMNT procedure.

For removing storage device - user needs to safely un-mount the device
and then eject. But if 'EBUSY' occurs in umount then it will create
confusion for the user as it will mean some I/O is in progress - and
won't allow user to safely ejecting device.

1. Without this patch:

On NFS Client:
$ mount.nfs <NFS_SERVER>:/mnt /mnt
$ umount.nfs /mnt

On NFS Server:
$ umount /mnt
umount: can't umount /mnt: Device or resource busy

2. With this patch:

On NFS Client:
$ mount.nfs <NFS_SERVER>:/mnt /mnt
$ umount.nfs /mnt

On NFS Server:
$ umount.nfs /mnt --> umount successful

Signed-off-by: Namjae Jeon <linkinjeon@...il.com>
Signed-off-by: Vivek Trivedi <vtrivedi018@...il.com>
---
 utils/mountd/mountd.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c
index bcf5080..2b190fb 100644
--- a/utils/mountd/mountd.c
+++ b/utils/mountd/mountd.c
@@ -275,6 +275,7 @@ mount_umnt_1_svc(struct svc_req *rqstp, dirpath *argp, void *UNUSED(resp))
 		return 1;
 
 	mountlist_del(host_ntop(sap, buf, sizeof(buf)), p);
+	cache_flush(1);
 	return 1;
 }
 
@@ -292,6 +293,7 @@ mount_umntall_1_svc(struct svc_req *rqstp, void *UNUSED(argp),
 	auth_reload();
 
 	mountlist_del_all(nfs_getrpccaller(rqstp->rq_xprt));
+	cache_flush(1);
 	return 1;
 }
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ