diff mbox series

[04/18] btrfs: rename __unlock_for_delalloc() and drop underscores

Message ID cb2e56cec569be6600b2a159f8ecf98907ad87e6.1736418116.git.dsterba@suse.com (mailing list archive)
State New
Headers show
Series Random cleanups for 6.14 | expand

Commit Message

David Sterba Jan. 9, 2025, 10:24 a.m. UTC
Drop the underscores as the naming scheme does not apply here and to
have the unlock for parity with lock_delalloc_folios().

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/extent_io.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Johannes Thumshirn Jan. 9, 2025, 12:07 p.m. UTC | #1
On 09.01.25 11:27, David Sterba wrote:
> Drop the underscores as the naming scheme does not apply here and to
> have the unlock for parity with lock_delalloc_folios().

That sentence somehow doesn't sound good in my head, maybe

Drop the leading underscores in '__unlock_for_delalloc()' and rename it 
to 'unlock_delalloc_folio()'. This also ensures naming parity with 
'lock_delalloc_folios()'.
diff mbox series

Patch

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 9725ff7f274d..8c472560e43e 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -221,7 +221,7 @@  static void __process_folios_contig(struct address_space *mapping,
 	}
 }
 
-static noinline void __unlock_for_delalloc(const struct inode *inode,
+static noinline void unlock_delalloc_folio(const struct inode *inode,
 					   const struct folio *locked_folio,
 					   u64 start, u64 end)
 {
@@ -288,8 +288,7 @@  static noinline int lock_delalloc_folios(struct inode *inode,
 out:
 	folio_batch_release(&fbatch);
 	if (processed_end > start)
-		__unlock_for_delalloc(inode, locked_folio, start,
-				      processed_end);
+		unlock_delalloc_folio(inode, locked_folio, start, processed_end);
 	return -EAGAIN;
 }
 
@@ -390,7 +389,7 @@  noinline_for_stack bool find_lock_delalloc_range(struct inode *inode,
 
 	unlock_extent(tree, delalloc_start, delalloc_end, &cached_state);
 	if (!ret) {
-		__unlock_for_delalloc(inode, locked_folio, delalloc_start,
+		unlock_delalloc_folio(inode, locked_folio, delalloc_start,
 				      delalloc_end);
 		cond_resched();
 		goto again;
@@ -1247,7 +1246,7 @@  static noinline_for_stack int writepage_delalloc(struct btrfs_inode *inode,
 			 */
 			unlock_extent(&inode->io_tree, found_start,
 				      found_start + found_len - 1, NULL);
-			__unlock_for_delalloc(&inode->vfs_inode, folio,
+			unlock_delalloc_folio(&inode->vfs_inode, folio,
 					      found_start,
 					      found_start + found_len - 1);
 		}