diff options
author | Jan Kara <jack@suse.cz> | 2011-02-03 14:16:19 +0100 |
---|---|---|
committer | Joel Becker <jlbec@evilplan.org> | 2011-02-20 02:33:32 -0800 |
commit | 705773a6656bba66f2a80a44ddaacf9620df8a59 (patch) | |
tree | 8fc55763274643daa997dbed87f728a59f5b6b4a /fs | |
parent | 0cc9d5257857608ba85885b75fcada13d359b5d1 (diff) | |
download | linux-rpi3-705773a6656bba66f2a80a44ddaacf9620df8a59.tar.gz linux-rpi3-705773a6656bba66f2a80a44ddaacf9620df8a59.tar.bz2 linux-rpi3-705773a6656bba66f2a80a44ddaacf9620df8a59.zip |
ocfs2: Fix estimate of necessary credits for mkdir
In the rare case that INLINE_DATA, INDEX_DIR, QUOTA, XATTR features are
disabled and both the allocation of the directory inode and the allocation
of the first directory block need to relink allocation group, there need
not be enough credits reserved in a transaction. Fix the estimate.
CC: Mark Fasheh <mfasheh@suse.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ocfs2/journal.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ocfs2/journal.h b/fs/ocfs2/journal.h index 43e56b97f9c0..6180da1e37e6 100644 --- a/fs/ocfs2/journal.h +++ b/fs/ocfs2/journal.h @@ -405,9 +405,9 @@ static inline int ocfs2_remove_extent_credits(struct super_block *sb) ocfs2_quota_trans_credits(sb); } -/* data block for new dir/symlink, 2 for bitmap updates (bitmap fe + - * bitmap block for the new bit) dx_root update for free list */ -#define OCFS2_DIR_LINK_ADDITIONAL_CREDITS (1 + 2 + 1) +/* data block for new dir/symlink, allocation of directory block, dx_root + * update for free list */ +#define OCFS2_DIR_LINK_ADDITIONAL_CREDITS (1 + OCFS2_SUBALLOC_ALLOC + 1) static inline int ocfs2_add_dir_index_credits(struct super_block *sb) { |