ocfs2: Fix a missing credit when deleting from indexed directories.
commitdfa13f39b798fee68250abe1aed851395c8b51b5
authorJoel Becker <joel.becker@oracle.com>
Thu, 30 Apr 2009 00:55:08 +0000 (29 17:55 -0700)
committerJoel Becker <joel.becker@oracle.com>
Thu, 30 Apr 2009 20:21:56 +0000 (30 13:21 -0700)
tree9a563954a2b7f34cb005a35152213d734f4763c9
parent7e31a966ad270ba32a77c157c015cd7c82faaa55
ocfs2: Fix a missing credit when deleting from indexed directories.

The ocfs2 directory index updates two blocks when we remove an entry -
the dx root and the dx leaf.  OCFS2_DELETE_INODE_CREDITS was only
accounting for the dx leaf.  This shows up when ocfs2_delete_inode()
runs out of credits in jbd2_journal_dirty_metadata() at
"J_ASSERT_JH(jh, handle->h_buffer_credits > 0);".

The test that caught this was running dirop_file_racer from the
ocfs2-test suite with a 250-character filename PREFIX.  Run on a 512B
blocksize, it forces the orphan dir index to grow large enough to
trigger.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/journal.h