diff options
-rw-r--r-- | fs/ext4/ext4_jbd2.h | 6 | ||||
-rw-r--r-- | fs/ext4/namei.c | 4 |
2 files changed, 2 insertions, 8 deletions
diff --git a/fs/ext4/ext4_jbd2.h b/fs/ext4/ext4_jbd2.h index 302814b85945..c1fc2dca14ae 100644 --- a/fs/ext4/ext4_jbd2.h +++ b/fs/ext4/ext4_jbd2.h | |||
@@ -59,12 +59,6 @@ | |||
59 | #define EXT4_META_TRANS_BLOCKS(sb) (EXT4_XATTR_TRANS_BLOCKS + \ | 59 | #define EXT4_META_TRANS_BLOCKS(sb) (EXT4_XATTR_TRANS_BLOCKS + \ |
60 | EXT4_MAXQUOTAS_TRANS_BLOCKS(sb)) | 60 | EXT4_MAXQUOTAS_TRANS_BLOCKS(sb)) |
61 | 61 | ||
62 | /* Delete operations potentially hit one directory's namespace plus an | ||
63 | * entire inode, plus arbitrary amounts of bitmap/indirection data. Be | ||
64 | * generous. We can grow the delete transaction later if necessary. */ | ||
65 | |||
66 | #define EXT4_DELETE_TRANS_BLOCKS(sb) (2 * EXT4_DATA_TRANS_BLOCKS(sb) + 64) | ||
67 | |||
68 | /* Define an arbitrary limit for the amount of data we will anticipate | 62 | /* Define an arbitrary limit for the amount of data we will anticipate |
69 | * writing to any given transaction. For unbounded transactions such as | 63 | * writing to any given transaction. For unbounded transactions such as |
70 | * write(2) and truncate(2) we can write more than this, but we always | 64 | * write(2) and truncate(2) we can write more than this, but we always |
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 36a4afd12f39..5f3d2b569c63 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c | |||
@@ -2748,7 +2748,7 @@ static int ext4_rmdir(struct inode *dir, struct dentry *dentry) | |||
2748 | goto end_rmdir; | 2748 | goto end_rmdir; |
2749 | 2749 | ||
2750 | handle = ext4_journal_start(dir, EXT4_HT_DIR, | 2750 | handle = ext4_journal_start(dir, EXT4_HT_DIR, |
2751 | EXT4_DELETE_TRANS_BLOCKS(dir->i_sb)); | 2751 | EXT4_DATA_TRANS_BLOCKS(dir->i_sb)); |
2752 | if (IS_ERR(handle)) { | 2752 | if (IS_ERR(handle)) { |
2753 | retval = PTR_ERR(handle); | 2753 | retval = PTR_ERR(handle); |
2754 | handle = NULL; | 2754 | handle = NULL; |
@@ -2811,7 +2811,7 @@ static int ext4_unlink(struct inode *dir, struct dentry *dentry) | |||
2811 | goto end_unlink; | 2811 | goto end_unlink; |
2812 | 2812 | ||
2813 | handle = ext4_journal_start(dir, EXT4_HT_DIR, | 2813 | handle = ext4_journal_start(dir, EXT4_HT_DIR, |
2814 | EXT4_DELETE_TRANS_BLOCKS(dir->i_sb)); | 2814 | EXT4_DATA_TRANS_BLOCKS(dir->i_sb)); |
2815 | if (IS_ERR(handle)) { | 2815 | if (IS_ERR(handle)) { |
2816 | retval = PTR_ERR(handle); | 2816 | retval = PTR_ERR(handle); |
2817 | handle = NULL; | 2817 | handle = NULL; |