xfs
[Top] [All Lists]

TAKE 986238 - Prevent lockdep false positives when locking two inodes.

To: xfs@xxxxxxxxxxx, sgi.bugs.xfs@xxxxxxxxxxxx
Subject: TAKE 986238 - Prevent lockdep false positives when locking two inodes.
From: pleckie@xxxxxxx (Peter Leckie)
Date: Fri, 29 Aug 2008 12:00:59 +1000 (EST)
Sender: xfs-bounce@xxxxxxxxxxx
Prevent lockdep false positives when locking two inodes.

If we call xfs_lock_two_inodes() to grab both the iolock and
the ilock, then drop the ilocks on both inodes, then grab
them again (as xfs_swap_extents() does) then lockdep will
report a locking order problem. This is a false positive.

To avoid this, disallow xfs_lock_two_inodes() fom locking both
inode locks at once - force calers to make two separate calls.
This means that nested dropping and regaining of the ilocks
will retain the same lockdep subclass and so lockdep will
not see anything wrong with this code.

Signed-off-by: Dave Chinner <david@xxxxxxxxxxxxx>
Signed-off-by: Christoph Hellwig <hch@xxxxxx>


Date:  Fri Aug 29 11:53:42 AEST 2008
Workarea:  chapter11.melbourne.sgi.com:/scratch/pleckie/2.6.x-xfs
Inspected by:  pleckie,david@xxxxxxxxxxxxx

The following file(s) were checked into:
  longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb


Modid:  xfs-linux-melb:xfs-kern:31999a
fs/xfs/xfs_vnodeops.c - 1.773 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vnodeops.c.diff?r1=text&tr1=1.773&r2=text&tr2=1.772&f=h
        - Prevent lockdep false positives when locking two inodes.

fs/xfs/xfs_dfrag.c - 1.72 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dfrag.c.diff?r1=text&tr1=1.72&r2=text&tr2=1.71&f=h
        - Prevent lockdep false positives when locking two inodes.


<Prev in Thread] Current Thread [Next in Thread>
  • TAKE 986238 - Prevent lockdep false positives when locking two inodes., Peter Leckie <=