Re: [PATCH 5/9] rpc: call release_pipe only on last close

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

 



On Mon, Nov 10, 2008 at 03:26:40PM -0500, bfields wrote:
> Yep.  And when we're in that situation, last_close is true, so
> 
> 	if (last_close && ops->release_pipe)
> 		ops->release_pipe(inode)
> 
> does ensure that calls to the ->open_pipe() and ->release_pipe() methods
> balance, as originally claimed.

(Trivial to verify, by the way: search the code for every assignment to
nreaders or nwriters, and verify that:

	nreaders+nwriters is always initialized to zero.
	each time nreaders+nwriters transitions from 0 to positive, we
		call ->pipe_open().
	each time nreaders+nwriters transitions from positive to 0, we
		call ->pipe_release().
	nreaders+nwriters always transitions back to 0 before the
		containing inode is freed.

And all of this happens under the i_mutex.)

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