[PATCH] SQUASHME: pnfs-submit: check for NULL nfs_client in nfs4_init_pnfs

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

 



server->nfs_client may be NULL on entry if nfs4_init_client() failed

Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxxx>
---
 fs/nfs/client.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 1979831..8c27a91 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -888,7 +888,7 @@ static void nfs4_init_pnfs(struct nfs_server *server, struct nfs_fsinfo *fsinfo)
 static void nfs4_uninit_pnfs(struct nfs_server *server)
 {
 #if defined(CONFIG_NFS_V4_1)
-	if (nfs4_has_session(server->nfs_client))
+	if (server->nfs_client && nfs4_has_session(server->nfs_client))
 		unmount_pnfs_layoutdriver(server);
 #endif /* CONFIG_NFS_V4_1 */
 }
-- 
1.6.6.1

--
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