[RFC v2 7/7] NFS: Propagate operations to unshared clients

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

 



If a struct nfs_server's client is not shared with other superblocks,
propagate the umount_begin and serverfailed behavior to it.

Signed-off-by: Joshua Watt <JPEWhacker@xxxxxxxxx>
---
 fs/nfs/super.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index bca38e1cdd85..0348fd43ffe4 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -911,6 +911,11 @@ void nfs_umount_begin(struct super_block *sb)
 	rpc = server->client;
 	if (!IS_ERR(rpc))
 		rpc_killall_tasks(rpc);
+
+	rpc = server->nfs_client->cl_rpcclient;
+	if (test_bit(NFS_CS_UNSHARED, &server->nfs_client->cl_flags) &&
+	    !IS_ERR(rpc))
+		rpc_killall_tasks(rpc);
 }
 EXPORT_SYMBOL_GPL(nfs_umount_begin);
 
@@ -2223,6 +2228,7 @@ nfs_compare_and_set_remount_data(struct nfs_server *nfss,
 {
 	int changed_flags_mask = data->flags_mask & NFS_REMOUNT_CHANGE_FLAGS;
 	struct rpc_clnt *cl = nfss->client;
+	bool serverfailed;
 
 	if ((data->flags ^ nfss->flags) & NFS_REMOUNT_CMP_FLAGMASK ||
 	    data->rsize != nfss->rsize ||
@@ -2257,7 +2263,11 @@ nfs_compare_and_set_remount_data(struct nfs_server *nfss,
 		cl->cl_timeout_default.to_initval = data->timeo * HZ / 10U;
 	}
 
-	cl->cl_kill_new_tasks = !!(nfss->flags & NFS_MOUNT_SERVERFAILED);
+	serverfailed = !!(nfss->flags & NFS_MOUNT_SERVERFAILED);
+	cl->cl_kill_new_tasks = serverfailed;
+	if (test_bit(NFS_CS_UNSHARED, &nfss->nfs_client->cl_flags))
+		nfss->nfs_client->cl_rpcclient->cl_kill_new_tasks =
+			serverfailed;
 
 	return 0;
 }
-- 
2.13.6

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



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux