[PATCH] buffer_head refcounting fixes and cleanup
There was some strange code in the __getblk()/__find_get_block()/ __bread() area which was performimg multiple bh_lru_install() calls as well as multiple touch_buffer() calls. Fix all that up. We only need to run bh_lru_install() and touch_buffer() in __find_get_block(). Because if the block wasn't found, __getblk() will create it and will re-run __find_get_block(). Also document a few things and make a couple of internal symbols static to buffer.c Also, don't run __find_get_block() from within unmap_underlying_metadata(). We hardly expect to find that block inside the LRU. And we hardly expect to use it as metadata in the near future so there's no point in letting it evict another buffer if we found it. So just go straight into the pagecache lookup for unmap_underlying_metadata().
Showing
Please register or sign in to comment