Whamcloud - gitweb
LU-6722 ldiskfs: fix credits at ldiskfs_delete_inode
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / rhel7 / ext4-mmp-brelse.patch
1 --- linux-stage.orig/fs/ext4/mmp.c      2015-10-06 08:21:12.013939184 +0530
2 +++ linux-stage/fs/ext4/mmp.c   2015-10-06 08:20:35.242939292 +0530
3 @@ -99,8 +99,11 @@ static int read_mmp_block(struct super_b
4  
5         mmp = (struct mmp_struct *)((*bh)->b_data);
6         if (le32_to_cpu(mmp->mmp_magic) != EXT4_MMP_MAGIC ||
7 -           !ext4_mmp_csum_verify(sb, mmp))
8 +           !ext4_mmp_csum_verify(sb, mmp)) {
9 +               brelse(*bh);
10 +               *bh = NULL;
11                 return -EINVAL;
12 +       }
13  
14         return 0;
15  }
16 @@ -219,6 +221,7 @@ static int kmmpd(void *data)
17                                              "The filesystem seems to have been"
18                                              " multiply mounted.");
19                                 ext4_error(sb, "abort");
20 +                               put_bh(bh_check);
21                                 goto failed;
22                         }
23                         put_bh(bh_check);