mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
ext4: clean up ext4_abort() so __func__ is now implicit
Use a macro definition for ext4_abort() to clean up the .c files a wee bit. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
parent
4a9cdec73f
commit
c67d859e39
@ -1629,8 +1629,10 @@ extern void ext4_error_inode(const char *, struct inode *, const char *, ...)
|
|||||||
extern void ext4_error_file(const char *, struct file *, const char *, ...)
|
extern void ext4_error_file(const char *, struct file *, const char *, ...)
|
||||||
__attribute__ ((format (printf, 3, 4)));
|
__attribute__ ((format (printf, 3, 4)));
|
||||||
extern void __ext4_std_error(struct super_block *, const char *, int);
|
extern void __ext4_std_error(struct super_block *, const char *, int);
|
||||||
extern void ext4_abort(struct super_block *, const char *, const char *, ...)
|
extern void __ext4_abort(struct super_block *, const char *, const char *, ...)
|
||||||
__attribute__ ((format (printf, 3, 4)));
|
__attribute__ ((format (printf, 3, 4)));
|
||||||
|
#define ext4_abort(sb, message...) __ext4_abort(sb, __func__, \
|
||||||
|
## message)
|
||||||
extern void __ext4_warning(struct super_block *, const char *,
|
extern void __ext4_warning(struct super_block *, const char *,
|
||||||
const char *, ...)
|
const char *, ...)
|
||||||
__attribute__ ((format (printf, 3, 4)));
|
__attribute__ ((format (printf, 3, 4)));
|
||||||
|
@ -93,8 +93,8 @@ int __ext4_forget(const char *where, handle_t *handle, int is_metadata,
|
|||||||
err = jbd2_journal_revoke(handle, blocknr, bh);
|
err = jbd2_journal_revoke(handle, blocknr, bh);
|
||||||
if (err) {
|
if (err) {
|
||||||
ext4_journal_abort_handle(where, __func__, bh, handle, err);
|
ext4_journal_abort_handle(where, __func__, bh, handle, err);
|
||||||
ext4_abort(inode->i_sb, __func__,
|
__ext4_abort(inode->i_sb, where,
|
||||||
"error %d when attempting revoke", err);
|
"error %d when attempting revoke", err);
|
||||||
}
|
}
|
||||||
BUFFER_TRACE(bh, "exit");
|
BUFFER_TRACE(bh, "exit");
|
||||||
return err;
|
return err;
|
||||||
|
@ -248,7 +248,7 @@ handle_t *ext4_journal_start_sb(struct super_block *sb, int nblocks)
|
|||||||
journal = EXT4_SB(sb)->s_journal;
|
journal = EXT4_SB(sb)->s_journal;
|
||||||
if (journal) {
|
if (journal) {
|
||||||
if (is_journal_aborted(journal)) {
|
if (is_journal_aborted(journal)) {
|
||||||
ext4_abort(sb, __func__, "Detected aborted journal");
|
ext4_abort(sb, "Detected aborted journal");
|
||||||
return ERR_PTR(-EROFS);
|
return ERR_PTR(-EROFS);
|
||||||
}
|
}
|
||||||
return jbd2_journal_start(journal, nblocks);
|
return jbd2_journal_start(journal, nblocks);
|
||||||
@ -464,8 +464,8 @@ void __ext4_std_error(struct super_block *sb, const char *function, int errno)
|
|||||||
* case we take the easy way out and panic immediately.
|
* case we take the easy way out and panic immediately.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void ext4_abort(struct super_block *sb, const char *function,
|
void __ext4_abort(struct super_block *sb, const char *function,
|
||||||
const char *fmt, ...)
|
const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
@ -660,8 +660,7 @@ static void ext4_put_super(struct super_block *sb)
|
|||||||
err = jbd2_journal_destroy(sbi->s_journal);
|
err = jbd2_journal_destroy(sbi->s_journal);
|
||||||
sbi->s_journal = NULL;
|
sbi->s_journal = NULL;
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
ext4_abort(sb, __func__,
|
ext4_abort(sb, "Couldn't clean up the journal");
|
||||||
"Couldn't clean up the journal");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ext4_release_system_zone(sb);
|
ext4_release_system_zone(sb);
|
||||||
@ -3605,7 +3604,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED)
|
if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED)
|
||||||
ext4_abort(sb, __func__, "Abort forced by user");
|
ext4_abort(sb, "Abort forced by user");
|
||||||
|
|
||||||
sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
|
sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
|
||||||
(test_opt(sb, POSIX_ACL) ? MS_POSIXACL : 0);
|
(test_opt(sb, POSIX_ACL) ? MS_POSIXACL : 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user