aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/reiserfs/journal.c23
-rw-r--r--fs/reiserfs/prints.c2
-rw-r--r--include/linux/reiserfs_fs.h2
3 files changed, 6 insertions, 21 deletions
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index 774f3ba37409..db91754cfb83 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -4295,14 +4295,15 @@ static int do_journal_end(struct reiserfs_transaction_handle *th,
4295 return journal->j_errno; 4295 return journal->j_errno;
4296} 4296}
4297 4297
4298static void __reiserfs_journal_abort_hard(struct super_block *sb) 4298/* Send the file system read only and refuse new transactions */
4299void reiserfs_abort_journal(struct super_block *sb, int errno)
4299{ 4300{
4300 struct reiserfs_journal *journal = SB_JOURNAL(sb); 4301 struct reiserfs_journal *journal = SB_JOURNAL(sb);
4301 if (test_bit(J_ABORTED, &journal->j_state)) 4302 if (test_bit(J_ABORTED, &journal->j_state))
4302 return; 4303 return;
4303 4304
4304 printk(KERN_CRIT "REISERFS: Aborting journal for filesystem on %s\n", 4305 if (!journal->j_errno)
4305 reiserfs_bdevname(sb)); 4306 journal->j_errno = errno;
4306 4307
4307 sb->s_flags |= MS_RDONLY; 4308 sb->s_flags |= MS_RDONLY;
4308 set_bit(J_ABORTED, &journal->j_state); 4309 set_bit(J_ABORTED, &journal->j_state);
@@ -4312,19 +4313,3 @@ static void __reiserfs_journal_abort_hard(struct super_block *sb)
4312#endif 4313#endif
4313} 4314}
4314 4315
4315static void __reiserfs_journal_abort_soft(struct super_block *sb, int errno)
4316{
4317 struct reiserfs_journal *journal = SB_JOURNAL(sb);
4318 if (test_bit(J_ABORTED, &journal->j_state))
4319 return;
4320
4321 if (!journal->j_errno)
4322 journal->j_errno = errno;
4323
4324 __reiserfs_journal_abort_hard(sb);
4325}
4326
4327void reiserfs_journal_abort(struct super_block *sb, int errno)
4328{
4329 __reiserfs_journal_abort_soft(sb, errno);
4330}
diff --git a/fs/reiserfs/prints.c b/fs/reiserfs/prints.c
index 1964acb6eb17..84f3f69652e3 100644
--- a/fs/reiserfs/prints.c
+++ b/fs/reiserfs/prints.c
@@ -386,7 +386,7 @@ void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...)
386 error_buf); 386 error_buf);
387 387
388 sb->s_flags |= MS_RDONLY; 388 sb->s_flags |= MS_RDONLY;
389 reiserfs_journal_abort(sb, errno); 389 reiserfs_abort_journal(sb, errno);
390} 390}
391 391
392/* this prints internal nodes (4 keys/items in line) (dc_number, 392/* this prints internal nodes (4 keys/items in line) (dc_number,
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index 04bfd61eeaaa..d097966bbd91 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -1771,7 +1771,7 @@ int journal_begin(struct reiserfs_transaction_handle *,
1771 struct super_block *p_s_sb, unsigned long); 1771 struct super_block *p_s_sb, unsigned long);
1772int journal_join_abort(struct reiserfs_transaction_handle *, 1772int journal_join_abort(struct reiserfs_transaction_handle *,
1773 struct super_block *p_s_sb, unsigned long); 1773 struct super_block *p_s_sb, unsigned long);
1774void reiserfs_journal_abort(struct super_block *sb, int errno); 1774void reiserfs_abort_journal(struct super_block *sb, int errno);
1775void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...); 1775void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...);
1776int reiserfs_allocate_list_bitmaps(struct super_block *s, 1776int reiserfs_allocate_list_bitmaps(struct super_block *s,
1777 struct reiserfs_list_bitmap *, unsigned int); 1777 struct reiserfs_list_bitmap *, unsigned int);