Skip to content

Commit

Permalink
ocfs2: ocfs2_link() journal credits update
Browse files Browse the repository at this point in the history
Commit 592282c fixed some missing directory
c/mtime updates in part by introducing a dinode update in ocfs2_add_entry().
Unfortunately, ocfs2_link() (which didn't update the directory inode before)
is now missing a single journal credit. Fix this by doubling the number of
inode updates expected during hard link creation.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
  • Loading branch information
Mark Fasheh committed Feb 1, 2007
1 parent 190ff5b commit e051fda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ocfs2/journal.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ int ocfs2_journal_dirty_data(handle_t *handle,
* for the dinode, one for the new block. */
#define OCFS2_SIMPLE_DIR_EXTEND_CREDITS (2)

/* file update (nlink, etc) + dir entry block */
#define OCFS2_LINK_CREDITS (OCFS2_INODE_UPDATE_CREDITS + 1)
/* file update (nlink, etc) + directory mtime/ctime + dir entry block */
#define OCFS2_LINK_CREDITS (2*OCFS2_INODE_UPDATE_CREDITS + 1)

/* inode + dir inode (if we unlink a dir), + dir entry block + orphan
* dir inode link */
Expand Down

0 comments on commit e051fda

Please sign in to comment.