Skip to contentSkip to conversation

pnfsblock: add missing rpc_put_mount and path_put

PATCH In review Jim Rees 4 participants 6 messages Sep 13, 2011 – Sep 19, 2011

Subsystems (2)
lore
Share & tools
lore

Jim Rees

author
#0 lore raw

PATCH 1/1 pnfsblock: add missing rpc_put_mount and path_put

From: Peng Tao <[email protected]>

---
 fs/nfs/blocklayout/blocklayout.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
fs/nfs/blocklayout/blocklayout.c +6 -2
index 9675ef9..8f97578 100644
@@ -1009,17 +1009,20 @@ static int __init nfs4blocklayout_init(void)
 			      mnt,
 			      NFS_PIPE_DIRNAME, 0, &path);
 	if (ret)
-		goto out_remove;
+		goto out_putrpc;
 
 	bl_device_pipe = rpc_mkpipe(path.dentry, "blocklayout", NULL,
 				    &bl_upcall_ops, 0);
+	path_put(&path);
 	if (IS_ERR(bl_device_pipe)) {
 		ret = PTR_ERR(bl_device_pipe);
-		goto out_remove;
+		goto out_putrpc;
 	}
 out:
 	return ret;
 
+out_putrpc:
+	rpc_put_mount();
 out_remove:
 	pnfs_unregister_layoutdriver(&blocklayout_type);
 out_stop:
@@ -1035,6 +1038,7 @@ static void __exit nfs4blocklayout_exit(void)
 	pnfs_unregister_layoutdriver(&blocklayout_type);
 	pnfsiod_stop();
 	rpc_unlink(bl_device_pipe);
+	rpc_put_mount();
 }
 
 MODULE_ALIAS("nfs-layouttype4-3");
Signature · 1 line
1.7.4.1
#1 lore raw

We need to decide on a process here :)
If we would like to maintain a staging tree in front of Trond's then to simplify merging and rebasing, fixes to code that's already upstream, i.e. in linux-2.6 or already queued in nfs-2.6, that we decide to send to Trond ahead of queue need to be queued in front of stuff in the staging tree and the latter should be rebased on top of them.

Benny

Quoted 44 lines · Jim Rees

From: Peng Tao <[email protected]>

---
 fs/nfs/blocklayout/blocklayout.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
fs/nfs/blocklayout/blocklayout.c +6 -2
index 9675ef9..8f97578 100644
@@ -1009,17 +1009,20 @@ static int __init nfs4blocklayout_init(void)
 			      mnt,
 			      NFS_PIPE_DIRNAME, 0, &path);
 	if (ret)
-		goto out_remove;
+		goto out_putrpc;
 
 	bl_device_pipe = rpc_mkpipe(path.dentry, "blocklayout", NULL,
 				    &bl_upcall_ops, 0);
+	path_put(&path);
 	if (IS_ERR(bl_device_pipe)) {
 		ret = PTR_ERR(bl_device_pipe);
-		goto out_remove;
+		goto out_putrpc;
 	}
 out:
 	return ret;
 
+out_putrpc:
+	rpc_put_mount();
 out_remove:
 	pnfs_unregister_layoutdriver(&blocklayout_type);
 out_stop:
@@ -1035,6 +1038,7 @@ static void __exit nfs4blocklayout_exit(void)
 	pnfs_unregister_layoutdriver(&blocklayout_type);
 	pnfsiod_stop();
 	rpc_unlink(bl_device_pipe);
+	rpc_put_mount();
 }
 
 MODULE_ALIAS("nfs-layouttype4-3");
#2 lore raw
Quoted 9 lines

-----Original Message-----
From: Benny Halevy [mailto:[email protected]]
Sent: Wednesday, September 14, 2011 6:20 AM
To: Jim Rees; Peng Tao; Myklebust, Trond
Cc: [email protected]; peter honeyman
Subject: Re: [PATCH] pnfsblock: add missing rpc_put_mount and path_put

We need to decide on a process here :)
If we would like to maintain a staging tree in front of Trond's then

to simplify

Quoted 1 line

merging and rebasing, fixes to code that's already upstream, i.e. in

linux-2.6

Quoted 2 lines

or already queued in nfs-2.6, that we decide to send to Trond ahead of queue need to be queued in front of stuff in the staging tree and the

latter

Quoted 1 line

should be rebased on top of them.

Unless we're talking about a large merge, I tend to prefer patches. They are much easier to review...

Cheers
Trond

author
#3 lore raw
Quoted 9 lines · Trond

-----Original Message-----
From: Benny Halevy [mailto:[email protected]]
Sent: Wednesday, September 14, 2011 6:20 AM
To: Jim Rees; Peng Tao; Myklebust, Trond
Cc: [email protected]; peter honeyman
Subject: Re: [PATCH] pnfsblock: add missing rpc_put_mount and path_put

We need to decide on a process here :)
If we would like to maintain a staging tree in front of Trond's then

to simplify

Quoted 1 line

merging and rebasing, fixes to code that's already upstream, i.e. in

linux-2.6

Quoted 2 lines

or already queued in nfs-2.6, that we decide to send to Trond ahead of queue need to be queued in front of stuff in the staging tree and the

latter

Quoted 1 line

should be rebased on top of them.

Unless we're talking about a large merge, I tend to prefer patches. They are much easier to review...

I guess the problem is that we now have a patch in Trond's tree that conflicts with the workqueue patch that's staged for later in Benny's tree. I think what I need to do is send Benny a set of patches that starts with the same patch I sent Trond, and follows with one that adds the workqueue.

#4 lore raw
Quoted 7 lines

-----Original Message-----
From: Jim Rees [mailto:[email protected]]
Sent: Sunday, September 18, 2011 10:05 PM
To: Myklebust, Trond
Cc: Benny Halevy; Peng Tao; [email protected]; peter honeyman
Subject: Re: [PATCH] pnfsblock: add missing rpc_put_mount and path_put

Quoted 8 lines
Quoted 6 lines · Trond

-----Original Message-----
From: Benny Halevy [mailto:[email protected]]
Sent: Wednesday, September 14, 2011 6:20 AM
To: Jim Rees; Peng Tao; Myklebust, Trond
Cc: [email protected]; peter honeyman
Subject: Re: [PATCH] pnfsblock: add missing rpc_put_mount and

path_put

Quoted 3 lines
Quoted 3 lines

We need to decide on a process here :)
If we would like to maintain a staging tree in front of Trond's

then

Quoted 2 lines

to simplify

Quoted 1 line

merging and rebasing, fixes to code that's already upstream, i.e.

in

Quoted 2 lines

linux-2.6

Quoted 1 line

or already queued in nfs-2.6, that we decide to send to Trond

ahead of

Quoted 1 line
Quoted 1 line

queue need to be queued in front of stuff in the staging tree and

the

Quoted 4 lines

latter

Quoted 1 line

should be rebased on top of them.

Unless we're talking about a large merge, I tend to prefer patches.

They

Quoted 3 lines

are much easier to review...

I guess the problem is that we now have a patch in Trond's tree that

conflicts

Quoted 2 lines

with the workqueue patch that's staged for later in Benny's tree. I think what I need to do is send Benny a set of patches that starts

with the

Quoted 1 line

same patch I sent Trond, and follows with one that adds the workqueue.

Yes. That's the other good feature of patches: the onus of fixing up conflicts is on you and not on me... :-)

Trond

#5 lore raw
Quoted 36 lines · Trond
Quoted 7 lines

-----Original Message-----
From: Jim Rees [mailto:[email protected]]
Sent: Sunday, September 18, 2011 10:05 PM
To: Myklebust, Trond
Cc: Benny Halevy; Peng Tao; [email protected]; peter honeyman
Subject: Re: [PATCH] pnfsblock: add missing rpc_put_mount and path_put

Quoted 8 lines
Quoted 6 lines · Trond

-----Original Message-----
From: Benny Halevy [mailto:[email protected]]
Sent: Wednesday, September 14, 2011 6:20 AM
To: Jim Rees; Peng Tao; Myklebust, Trond
Cc: [email protected]; peter honeyman
Subject: Re: [PATCH] pnfsblock: add missing rpc_put_mount and

path_put

Quoted 3 lines
Quoted 3 lines

We need to decide on a process here :)
If we would like to maintain a staging tree in front of Trond's

then

Quoted 2 lines

to simplify

Quoted 1 line

merging and rebasing, fixes to code that's already upstream, i.e.

in

Quoted 2 lines

linux-2.6

Quoted 1 line

or already queued in nfs-2.6, that we decide to send to Trond

ahead of

Quoted 1 line
Quoted 1 line

queue need to be queued in front of stuff in the staging tree and

the

Quoted 4 lines

latter

Quoted 1 line

should be rebased on top of them.

Unless we're talking about a large merge, I tend to prefer patches.

They

Quoted 3 lines

are much easier to review...

I guess the problem is that we now have a patch in Trond's tree that

Quoted 9 lines

conflicts

Quoted 2 lines

with the workqueue patch that's staged for later in Benny's tree. I think what I need to do is send Benny a set of patches that starts

with the

Quoted 1 line

same patch I sent Trond, and follows with one that adds the workqueue.

Yes. That's the other good feature of patches: the onus of fixing up conflicts is on you and not on me... :-)

Right. If the required rebase is not trivial I prefer you do it for many reasons, including familiarity with the change and testing the end result. Then, either send the patchset to the list and/or point me to a branch in your tree for me to get the series from

Benny

Quoted 1 line

Trond