diff --git a/fs/ext4/super.c b/fs/ext4/super.c index c5fcf377ab1f..cd9531db8472 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -7248,6 +7248,10 @@ static ssize_t ext4_quota_write(struct super_block *sb, int type, brelse(bh); return err; } + if (test_bit(BH_Lock, &bh->b_state)) { + brelse(bh); + return -EIO; + } lock_buffer(bh); memcpy(bh->b_data+offset, data, len); flush_dcache_page(bh->b_page);