- knfsd-fixed-handling-of-lockd-fail-when-adding-nfsd-socket.patch removed from -mm tree

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

 



The patch titled

     knfsd: Fixed handling of lockd fail when adding nfsd socket

has been removed from the -mm tree.  Its filename is

     knfsd-fixed-handling-of-lockd-fail-when-adding-nfsd-socket.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: knfsd: Fixed handling of lockd fail when adding nfsd socket
From: NeilBrown <neilb@xxxxxxx>

Arrgg..  We cannot 'lockd_up' before 'svc_addsock' as we don't know the
protocol yet....  So switch it around again and save the name of the created
sockets so that it can be closed if lock_up fails.

Signed-off-by: Neil Brown <neilb@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/nfsd/nfsctl.c     |   12 ++++++------
 net/sunrpc/svcsock.c |    3 +++
 2 files changed, 9 insertions(+), 6 deletions(-)

diff -puN fs/nfsd/nfsctl.c~knfsd-fixed-handling-of-lockd-fail-when-adding-nfsd-socket fs/nfsd/nfsctl.c
--- a/fs/nfsd/nfsctl.c~knfsd-fixed-handling-of-lockd-fail-when-adding-nfsd-socket
+++ a/fs/nfsd/nfsctl.c
@@ -523,11 +523,11 @@ static ssize_t write_ports(struct file *
 		err = nfsd_create_serv();
 		if (!err) {
 			int proto = 0;
-			err = lockd_up(proto);
-			if (!err) {
-				err = svc_addsock(nfsd_serv, fd, buf, &proto);
-				if (err)
-					lockd_down();
+			err = svc_addsock(nfsd_serv, fd, buf, &proto);
+			if (err >= 0) {
+				err = lockd_up(proto);
+				if (err < 0)
+					svc_sock_names(buf+strlen(buf)+1, nfsd_serv, buf);
 			}
 			/* Decrease the count, but don't shutdown the
 			 * the service
@@ -536,7 +536,7 @@ static ssize_t write_ports(struct file *
 			nfsd_serv->sv_nrthreads--;
 			unlock_kernel();
 		}
-		return err;
+		return err < 0 ? err : 0;
 	}
 	if (buf[0] == '-') {
 		char *toclose = kstrdup(buf+1, GFP_KERNEL);
diff -puN net/sunrpc/svcsock.c~knfsd-fixed-handling-of-lockd-fail-when-adding-nfsd-socket net/sunrpc/svcsock.c
--- a/net/sunrpc/svcsock.c~knfsd-fixed-handling-of-lockd-fail-when-adding-nfsd-socket
+++ a/net/sunrpc/svcsock.c
@@ -492,6 +492,9 @@ svc_sock_names(char *buf, struct svc_ser
 	}
 	spin_unlock(&serv->sv_lock);
 	if (closesk)
+		/* Should unregister with portmap, but you cannot
+		 * unregister just one protocol...
+		 */
 		svc_delete_socket(closesk);
 	else if (toclose)
 		return -ENOENT;
_

Patches currently in -mm which might be from neilb@xxxxxxx are

origin.patch
vfs-destroy-the-dentries-contributed-by-a-superblock-on-unmounting.patch
knfsd-add-nfs-export-support-to-tmpfs.patch
knfsd-add-nfs-export-support-to-tmpfs-fixes.patch
md-dm-reduce-stack-usage-with-stacked-block-devices.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux