diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index b2e876bf0decfb77a0b887616f6291b37d289718..4587fba7de7bfd75b1192898fd4532e2ec07e586 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -55,7 +55,10 @@ #endif #define NL_EXT4_ERROR_GROUP 1 + +#define EXT3_ERROR_MAGIC 0xAE43125U #define EXT4_ERROR_MAGIC 0xAE32014U + struct ext4_err_msg { int magic; char s_id[32]; diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 1a0d494e57ae0ff68f08a188542bfade8b132c11..9becf3e2e20af1a68f3e612071ddb34fc37e8147 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -455,6 +455,8 @@ static void ext4_netlink_send_info(struct super_block *sb, int ext4_errno) struct ext4_err_msg *msg; if (ext4nl) { + if (IS_EXT2_SB(sb)) + return; size = NLMSG_SPACE(sizeof(struct ext4_err_msg)); skb = alloc_skb(size, GFP_ATOMIC); if (!skb) { @@ -466,7 +468,10 @@ static void ext4_netlink_send_info(struct super_block *sb, int ext4_errno) if (!nlh) goto nlmsg_failure; msg = (struct ext4_err_msg *)NLMSG_DATA(nlh); - msg->magic = EXT4_ERROR_MAGIC; + if (IS_EXT3_SB(sb)) + msg->magic = EXT3_ERROR_MAGIC; + else + msg->magic = EXT4_ERROR_MAGIC; memcpy(msg->s_id, sb->s_id, sizeof(sb->s_id)); msg->s_flags = sb->s_flags; msg->ext4_errno = ext4_errno;