]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.suse/reiserfs-rearrange-journal-abort.diff
Add a patch to fix Intel E100 wake-on-lan problems.
[ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.suse / reiserfs-rearrange-journal-abort.diff
1 From: Jeff Mahoney <jeffm@suse.com>
2 Subject: reiserfs: rearrange journal abort
3
4 This patch kills off reiserfs_journal_abort as it is never called, and
5 combines __reiserfs_journal_abort_{soft,hard} into one function called
6 reiserfs_abort_journal, which performs the same work. It is silent
7 as opposed to the old version, since the message was always issued
8 after a regular 'abort' message.
9
10 Signed-off-by: Jeff Mahoney <jeffm@suse.com>
11
12 ---
13 fs/reiserfs/journal.c | 23 ++++-------------------
14 fs/reiserfs/prints.c | 2 +-
15 include/linux/reiserfs_fs.h | 2 +-
16 3 files changed, 6 insertions(+), 21 deletions(-)
17
18 --- a/fs/reiserfs/journal.c
19 +++ b/fs/reiserfs/journal.c
20 @@ -4292,14 +4292,15 @@ static int do_journal_end(struct reiserf
21 return journal->j_errno;
22 }
23
24 -static void __reiserfs_journal_abort_hard(struct super_block *sb)
25 +/* Send the file system read only and refuse new transactions */
26 +void reiserfs_abort_journal(struct super_block *sb, int errno)
27 {
28 struct reiserfs_journal *journal = SB_JOURNAL(sb);
29 if (test_bit(J_ABORTED, &journal->j_state))
30 return;
31
32 - printk(KERN_CRIT "REISERFS: Aborting journal for filesystem on %s\n",
33 - reiserfs_bdevname(sb));
34 + if (!journal->j_errno)
35 + journal->j_errno = errno;
36
37 sb->s_flags |= MS_RDONLY;
38 set_bit(J_ABORTED, &journal->j_state);
39 @@ -4309,19 +4310,3 @@ static void __reiserfs_journal_abort_har
40 #endif
41 }
42
43 -static void __reiserfs_journal_abort_soft(struct super_block *sb, int errno)
44 -{
45 - struct reiserfs_journal *journal = SB_JOURNAL(sb);
46 - if (test_bit(J_ABORTED, &journal->j_state))
47 - return;
48 -
49 - if (!journal->j_errno)
50 - journal->j_errno = errno;
51 -
52 - __reiserfs_journal_abort_hard(sb);
53 -}
54 -
55 -void reiserfs_journal_abort(struct super_block *sb, int errno)
56 -{
57 - __reiserfs_journal_abort_soft(sb, errno);
58 -}
59 --- a/fs/reiserfs/prints.c
60 +++ b/fs/reiserfs/prints.c
61 @@ -389,7 +389,7 @@ void reiserfs_abort(struct super_block *
62 error_buf);
63
64 sb->s_flags |= MS_RDONLY;
65 - reiserfs_journal_abort(sb, errno);
66 + reiserfs_abort_journal(sb, errno);
67 }
68
69 /* this prints internal nodes (4 keys/items in line) (dc_number,
70 --- a/include/linux/reiserfs_fs.h
71 +++ b/include/linux/reiserfs_fs.h
72 @@ -1771,7 +1771,7 @@ int journal_begin(struct reiserfs_transa
73 struct super_block *p_s_sb, unsigned long);
74 int journal_join_abort(struct reiserfs_transaction_handle *,
75 struct super_block *p_s_sb, unsigned long);
76 -void reiserfs_journal_abort(struct super_block *sb, int errno);
77 +void reiserfs_abort_journal(struct super_block *sb, int errno);
78 void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...);
79 int reiserfs_allocate_list_bitmaps(struct super_block *s,
80 struct reiserfs_list_bitmap *, unsigned int);