- knfsd-call-lockd_down-when-closing-a-socket-via-a-write-to-nfsd-portlist.patch removed from -mm tree

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

 



The patch titled

     knfsd: call lockd_down when closing a socket via a write to nfsd/portlist

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

     knfsd-call-lockd_down-when-closing-a-socket-via-a-write-to-nfsd-portlist.patch

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

------------------------------------------------------
Subject: knfsd: call lockd_down when closing a socket via a write to nfsd/portlist
From: NeilBrown <neilb@xxxxxxx>

The refcount that nfsd holds on lockd is based on the number of open sockets. 
So when we close a socket, we should decrement the ref (with lockd_down).

Currently when a socket is closed via writing to the portlist file, that
doesn't happen.

So: make sure we get an error return if the socket that was requested does is
not found, and call lockd_down if it was.

Cc: "J. Bruce Fields" <bfields@xxxxxxxxxxxx>
Signed-off-by: Neil Brown <neilb@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/nfsd/nfsctl.c     |    2 ++
 net/sunrpc/svcsock.c |    2 ++
 2 files changed, 4 insertions(+)

diff -puN fs/nfsd/nfsctl.c~knfsd-call-lockd_down-when-closing-a-socket-via-a-write-to-nfsd-portlist fs/nfsd/nfsctl.c
--- a/fs/nfsd/nfsctl.c~knfsd-call-lockd_down-when-closing-a-socket-via-a-write-to-nfsd-portlist
+++ a/fs/nfsd/nfsctl.c
@@ -545,6 +545,8 @@ static ssize_t write_ports(struct file *
 		if (nfsd_serv)
 			len = svc_sock_names(buf, nfsd_serv, toclose);
 		unlock_kernel();
+		if (len >= 0)
+			lockd_down();
 		kfree(toclose);
 		return len;
 	}
diff -puN net/sunrpc/svcsock.c~knfsd-call-lockd_down-when-closing-a-socket-via-a-write-to-nfsd-portlist net/sunrpc/svcsock.c
--- a/net/sunrpc/svcsock.c~knfsd-call-lockd_down-when-closing-a-socket-via-a-write-to-nfsd-portlist
+++ a/net/sunrpc/svcsock.c
@@ -493,6 +493,8 @@ svc_sock_names(char *buf, struct svc_ser
 	spin_unlock(&serv->sv_lock);
 	if (closesk)
 		svc_delete_socket(closesk);
+	else if (toclose)
+		return -ENOENT;
 	return len;
 }
 EXPORT_SYMBOL(svc_sock_names);
_

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