diff mbox series

[1/2] writeback: add a __releases annoation to wbc_attach_and_unlock_inode

Message ID 20241107072632.672795-2-hch@lst.de (mailing list archive)
State New
Headers show
Series [1/2] writeback: add a __releases annoation to wbc_attach_and_unlock_inode | expand

Commit Message

Christoph Hellwig Nov. 7, 2024, 7:26 a.m. UTC
This shuts up a sparse lock context tracking warning.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/fs-writeback.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jan Kara Nov. 7, 2024, 9:21 a.m. UTC | #1
On Thu 07-11-24 07:26:18, Christoph Hellwig wrote:
> This shuts up a sparse lock context tracking warning.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Thanks! Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/fs-writeback.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
> index d8bec3c1bb1f..3fb115ae44b1 100644
> --- a/fs/fs-writeback.c
> +++ b/fs/fs-writeback.c
> @@ -733,6 +733,7 @@ bool cleanup_offline_cgwb(struct bdi_writeback *wb)
>   */
>  void wbc_attach_and_unlock_inode(struct writeback_control *wbc,
>  				 struct inode *inode)
> +	__releases(&inode->i_lock)
>  {
>  	if (!inode_cgwb_enabled(inode)) {
>  		spin_unlock(&inode->i_lock);
> -- 
> 2.45.2
>
diff mbox series

Patch

diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index d8bec3c1bb1f..3fb115ae44b1 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -733,6 +733,7 @@  bool cleanup_offline_cgwb(struct bdi_writeback *wb)
  */
 void wbc_attach_and_unlock_inode(struct writeback_control *wbc,
 				 struct inode *inode)
+	__releases(&inode->i_lock)
 {
 	if (!inode_cgwb_enabled(inode)) {
 		spin_unlock(&inode->i_lock);