Skip to contentSkip to conversation

f2fs: Remove pointless bit testing in f2fs_delete_entry()

PATCH New Jan Kara 1 participant 1 message Oct 23, 2014 F2FS file system

lore
Share & tools
lore

Jan Kara

author
#0 lore raw

PATCH 1/1 f2fs: Remove pointless bit testing in f2fs_delete_entry()

There's no point in using test_and_clear_bit_le() when we don't use the return value of the function. Just use clear_bit_le() instead.

Coverity-id: 1016434

---
 fs/f2fs/dir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/dir.c +1 -1
index b54f87149c09..c49f83956773 100644
@@ -579,7 +579,7 @@ void f2fs_delete_entry(struct f2fs_dir_entry *dentry, struct page *page,
 	dentry_blk = page_address(page);
 	bit_pos = dentry - dentry_blk->dentry;
 	for (i = 0; i < slots; i++)
-		test_and_clear_bit_le(bit_pos + i, &dentry_blk->dentry_bitmap);
+		clear_bit_le(bit_pos + i, &dentry_blk->dentry_bitmap);
 
 	/* Let's check and deallocate this dentry page */
 	bit_pos = find_next_bit_le(&dentry_blk->dentry_bitmap,
Signature · 4 lines
1.8.1.4


------------------------------------------------------------------------------