Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319866
b: refs/heads/master
c: 4f59af7
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Ben Myers committed Jul 29, 2012
1 parent 5920528 commit 723ba5f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 34 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5a15322da1a51ad8f3af1962de355885b6c606f2
refs/heads/master: 4f59af758f9092bc7b266ca919ce6067170e5172
15 changes: 0 additions & 15 deletions trunk/fs/xfs/xfs_iget.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,6 @@
#include "xfs_trace.h"


/*
* Define xfs inode iolock lockdep classes. We need to ensure that all active
* inodes are considered the same for lockdep purposes, including inodes that
* are recycled through the XFS_IRECLAIMABLE state. This is the the only way to
* guarantee the locks are considered the same when there are multiple lock
* initialisation siteѕ. Also, define a reclaimable inode class so it is
* obvious in lockdep reports which class the report is against.
*/
static struct lock_class_key xfs_iolock_active;
struct lock_class_key xfs_iolock_reclaimable;

/*
* Allocate and initialise an xfs_inode.
*/
Expand Down Expand Up @@ -80,8 +69,6 @@ xfs_inode_alloc(
ASSERT(ip->i_ino == 0);

mrlock_init(&ip->i_iolock, MRLOCK_BARRIER, "xfsio", ip->i_ino);
lockdep_set_class_and_name(&ip->i_iolock.mr_lock,
&xfs_iolock_active, "xfs_iolock_active");

/* initialise the xfs inode */
ip->i_ino = ino;
Expand Down Expand Up @@ -250,8 +237,6 @@ xfs_iget_cache_hit(

ASSERT(!rwsem_is_locked(&ip->i_iolock.mr_lock));
mrlock_init(&ip->i_iolock, MRLOCK_BARRIER, "xfsio", ip->i_ino);
lockdep_set_class_and_name(&ip->i_iolock.mr_lock,
&xfs_iolock_active, "xfs_iolock_active");

spin_unlock(&ip->i_flags_lock);
spin_unlock(&pag->pag_ici_lock);
Expand Down
2 changes: 0 additions & 2 deletions trunk/fs/xfs/xfs_inode.h
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,6 @@ static inline int xfs_isiflocked(struct xfs_inode *ip)
#define XFS_IOLOCK_DEP(flags) (((flags) & XFS_IOLOCK_DEP_MASK) >> XFS_IOLOCK_SHIFT)
#define XFS_ILOCK_DEP(flags) (((flags) & XFS_ILOCK_DEP_MASK) >> XFS_ILOCK_SHIFT)

extern struct lock_class_key xfs_iolock_reclaimable;

/*
* For multiple groups support: if S_ISGID bit is set in the parent
* directory, group of new file is set to that of the parent, and
Expand Down
18 changes: 2 additions & 16 deletions trunk/fs/xfs/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,8 @@ xfs_fs_evict_inode(
{
xfs_inode_t *ip = XFS_I(inode);

ASSERT(!rwsem_is_locked(&ip->i_iolock.mr_lock));

trace_xfs_evict_inode(ip);

truncate_inode_pages(&inode->i_data, 0);
Expand All @@ -882,22 +884,6 @@ xfs_fs_evict_inode(
XFS_STATS_INC(vn_remove);
XFS_STATS_DEC(vn_active);

/*
* The iolock is used by the file system to coordinate reads,
* writes, and block truncates. Up to this point the lock
* protected concurrent accesses by users of the inode. But
* from here forward we're doing some final processing of the
* inode because we're done with it, and although we reuse the
* iolock for protection it is really a distinct lock class
* (in the lockdep sense) from before. To keep lockdep happy
* (and basically indicate what we are doing), we explicitly
* re-init the iolock here.
*/
ASSERT(!rwsem_is_locked(&ip->i_iolock.mr_lock));
mrlock_init(&ip->i_iolock, MRLOCK_BARRIER, "xfsio", ip->i_ino);
lockdep_set_class_and_name(&ip->i_iolock.mr_lock,
&xfs_iolock_reclaimable, "xfs_iolock_reclaimable");

xfs_inactive(ip);
}

Expand Down

0 comments on commit 723ba5f

Please sign in to comment.