]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
ext4: add lockdep annotations for i_data_sem
authorTheodore Ts'o <tytso@mit.edu>
Fri, 1 Apr 2016 05:31:28 +0000 (01:31 -0400)
committerTim Gardner <tim.gardner@canonical.com>
Thu, 21 Apr 2016 13:20:36 +0000 (07:20 -0600)
commitcbc850686ae0abef7847363a246ed0f339242b94
tree98f4c9f79833953837097561f68246bbfc9e6423
parenta6317bd96285eb5d5907a091559ec21179526550
ext4: add lockdep annotations for i_data_sem

BugLink: http://bugs.launchpad.net/bugs/1573034
commit daf647d2dd58cec59570d7698a45b98e580f2076 upstream.

With the internal Quota feature, mke2fs creates empty quota inodes and
quota usage tracking is enabled as soon as the file system is mounted.
Since quotacheck is no longer preallocating all of the blocks in the
quota inode that are likely needed to be written to, we are now seeing
a lockdep false positive caused by needing to allocate a quota block
from inside ext4_map_blocks(), while holding i_data_sem for a data
inode.  This results in this complaint:

  Possible unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(&ei->i_data_sem);
                                lock(&s->s_dquot.dqio_mutex);
                                lock(&ei->i_data_sem);
   lock(&s->s_dquot.dqio_mutex);

Google-Bug-Id: 27907753

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
fs/ext4/ext4.h
fs/ext4/move_extent.c
fs/ext4/super.c