[PATCH 30/31] block: store the holder in file->private_data
Christoph Hellwig
hch at lst.de
Wed Jun 7 05:18:50 PDT 2023
On Wed, Jun 07, 2023 at 11:24:55AM +0200, Christian Brauner wrote:
> On Tue, Jun 06, 2023 at 09:39:49AM +0200, Christoph Hellwig wrote:
> > Store the file struct used as the holder in file->private_data as an
> > indicator that this file descriptor was opened exclusively to remove
> > the last use of FMODE_EXCL.
> >
> > Signed-off-by: Christoph Hellwig <hch at lst.de>
> > ---
>
> Feels a bit odd to store the object itself but anyway,
> Acked-by: Christian Brauner <brauner at kernel.org>
We could literally store anything we want. The only reason I picked the
file is because: a) we have it around and b) that allows passing it
to blkdev_put without a branch in blkdev_release.
If you prefer something else I can change it.
More information about the Linux-nvme
mailing list