In ocfs2_set_new_buffer_uptodate, the slow path in ocfs2_set_buffer_uptodate may fail, but ocfs2_set_new_buffer_uptodate will return without calling clear_buffer_uptodate(bh). This may never occur in runtime. Based on static analysis using PALLAS.
Specifically: set_buffer_uptodate(bh); ocfs2_metadata_cache_io_lock(ci); ocfs2_set_buffer_uptodate(ci, bh); ocfs2_metadata_cache_io_unlock(ci); If these two functions are correlated (via <bh>), should they be in the locked portion together? If set_buffer_uptodate is cleared in another thread, how does that affect ocfs2_set_buffer_uptodate?