Skip to contentSkip to conversation

Btrfs: do not warn_on io_ctl->cur in io_ctl_map_page

PATCH New Wang Sheng-Hui 1 participant 1 message Nov 23, 2012 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Btrfs: do not warn_on io_ctl->cur in io_ctl_map_page

io_ctl_map_page is called by many functions in free-space-cache. In most scenarios, the ->cur is not null, e.g. io_ctl_add_entry. I think we'd better remove the warn_on here.

---
 fs/btrfs/free-space-cache.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
fs/btrfs/free-space-cache.c +0 -1
index 1027b85..31fcf24 100644
@@ -307,7 +307,6 @@ static void io_ctl_unmap_page(struct io_ctl *io_ctl)
 
 static void io_ctl_map_page(struct io_ctl *io_ctl, int clear)
 {
-	WARN_ON(io_ctl->cur);
 	BUG_ON(io_ctl->index >= io_ctl->num_pages);
 	io_ctl->page = io_ctl->pages[io_ctl->index++];
 	io_ctl->cur = kmap(io_ctl->page);
Signature · 1 line
1.7.5.4