diff options
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/Kconfig | 8 | ||||
-rw-r--r-- | fs/ext4/ext4_journal.h | 2 | ||||
-rw-r--r-- | fs/ext4/ext4_write.c | 4 |
3 files changed, 12 insertions, 2 deletions
diff --git a/fs/ext4/Kconfig b/fs/ext4/Kconfig index 8ddaebebd48..a2faa9f878a 100644 --- a/fs/ext4/Kconfig +++ b/fs/ext4/Kconfig @@ -12,3 +12,11 @@ config EXT4_WRITE help This provides support for creating and writing new files to an existing ext4 filesystem partition. + +config EXT4_MAX_JOURNAL_ENTRIES + int "Maximum numbers of journal entries for ext4 filesystem" + default 100 + depends on EXT4_WRITE + help + This provides support for allocating the maximum number of + journal entries in disks formatted with ext4 filesysyem. diff --git a/fs/ext4/ext4_journal.h b/fs/ext4/ext4_journal.h index 43fb8e76641..a492df49fbe 100644 --- a/fs/ext4/ext4_journal.h +++ b/fs/ext4/ext4_journal.h @@ -38,7 +38,7 @@ #define EXT3_JOURNAL_FLAG_LAST_TAG 8 /* Maximum entries in 1 journal transaction */ -#define MAX_JOURNAL_ENTRIES 100 +#define MAX_JOURNAL_ENTRIES CONFIG_EXT4_MAX_JOURNAL_ENTRIES struct journal_log { char *buf; int blknr; diff --git a/fs/ext4/ext4_write.c b/fs/ext4/ext4_write.c index dd8ed40f888..5b290f0d80d 100644 --- a/fs/ext4/ext4_write.c +++ b/fs/ext4/ext4_write.c @@ -877,7 +877,8 @@ int ext4fs_write(const char *fname, const char *buffer, if (ext4fs_init() != 0) { printf("error in File System init\n"); - goto fail; + /* Skip ext4fs_deinit since ext4fs_init() already done that */ + goto fail_init; } missing_feat = le32_to_cpu(fs->sb->feature_incompat) & ~EXT4_FEATURE_INCOMPAT_SUPP; @@ -1050,6 +1051,7 @@ int ext4fs_write(const char *fname, const char *buffer, return 0; fail: ext4fs_deinit(); +fail_init: free(inode_buffer); free(g_parent_inode); free(temp_ptr); |