[PATCH 1/2] SQUASHME: pnfs-submit: have initialize_mountpoint return status

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

 



use status convention rather than boolean true for success.

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

diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 021c853..9d1274d 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -71,16 +71,16 @@ struct layoutdriver_io_operations filelayout_io_operations;
 int
 filelayout_initialize_mountpoint(struct nfs_client *clp)
 {
-
-	if (nfs4_alloc_init_deviceid_cache(clp,
-					   nfs4_fl_free_deviceid_callback)) {
+	int status = nfs4_alloc_init_deviceid_cache(clp,
+						nfs4_fl_free_deviceid_callback);
+	if (status) {
 		printk(KERN_WARNING "%s: deviceid cache could not be "
 			"initialized\n", __func__);
-		return 0;
+		return status;
 	}
 	dprintk("%s: deviceid cache has been initialized successfully\n",
 		__func__);
-	return 1;
+	return 0;
 }
 
 /* Uninitialize a mountpoint by destroying its device list.
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index ec543d2..3a09b91 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -211,7 +211,7 @@ set_pnfs_layoutdriver(struct nfs_server *server, u32 id)
 		return;
 
 	if (id > 0 && find_pnfs(id, &mod)) {
-		if (!mod->pnfs_ld_type->ld_io_ops->initialize_mountpoint(
+		if (mod->pnfs_ld_type->ld_io_ops->initialize_mountpoint(
 			server->nfs_client)) {
 			printk(KERN_ERR "%s: Error initializing mount point "
 			       "for layout driver %u. ", __func__, id);
-- 
1.6.5.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