[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140904174940.GD16935@infradead.org>
Date: Thu, 4 Sep 2014 10:49:40 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Jeff Layton <jlayton@...marydata.com>
Cc: linux-fsdevel@...r.kernel.org, linux-nfs@...r.kernel.org,
Christoph Hellwig <hch@...radead.org>,
"J. Bruce Fields" <bfields@...ldses.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 09/17] locks: define a lm_setup handler for leases
On Thu, Sep 04, 2014 at 08:38:35AM -0400, Jeff Layton wrote:
> ...and move the fasync setup into it for fcntl lease calls. At the same
> time, change the semantics of how the file_lock double-pointer is
> handled. Up until now, on a successful lease return you got a pointer to
> the lock on the list. This is bad, since that pointer can no longer be
> relied on as valid once the inode->i_lock has been released.
>
> Change the code to instead just zero out the pointer if the lease we
> passed in ended up being used. Then the callers can just check to see
> if it's NULL after the call and free it if it isn't.
>
> The priv argument has the same semantics. The lm_setup function can
> zero the pointer out to signal to the caller that it should not be
> freed after the function returns.
Looks good,
Reviewed-by: Christoph Hellwig <hch@....de>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists