]> www.infradead.org Git - users/hch/misc.git/commit
gfs2: switch to lockref_init(..., 1)
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 30 Jan 2025 13:56:22 +0000 (14:56 +0100)
committerChristian Brauner <brauner@kernel.org>
Fri, 7 Feb 2025 09:27:25 +0000 (10:27 +0100)
commit34ad6fa2add2b38f2a89d28518de0142bff8fb43
tree09123d1cf108361d1c446dd822a716cabefbbba2
parentd9b3a3c70df2c2b87c83ca3f6e8ab49bd092fdbd
gfs2: switch to lockref_init(..., 1)

In qd_alloc(), initialize the lockref count to 1 to cover the common
case.  Compensate for that in gfs2_quota_init() by adjusting the count
back down to 0; this only occurs when mounting the filesystem rw.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Link: https://lore.kernel.org/r/20250130135624.1899988-3-agruenba@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/gfs2/quota.c