diff options
author | Ira Weiny <[email protected]> | 2020-04-22 21:50:57 -0700 |
---|---|---|
committer | Darrick J. Wong <[email protected]> | 2020-05-04 09:03:17 -0700 |
commit | d45344d6c49cf9863e1d526fc1d8cb27ab147148 (patch) | |
tree | 767fe7b61d0ec73c638edf2f23098c6f28d0c60b | |
parent | 2f88f1efd02ddf76cb5973abc42474c4dac2b03a (diff) |
fs/xfs: Remove unnecessary initialization of i_rwsem
An earlier call of xfs_reinit_inode() from xfs_iget_cache_hit() already
handles initialization of i_rwsem.
Doing so again is unneeded.
Reviewed-by: Darrick J. Wong <[email protected]>
Reviewed-by: Dave Chinner <[email protected]>
Signed-off-by: Ira Weiny <[email protected]>
Signed-off-by: Darrick J. Wong <[email protected]>
-rw-r--r-- | fs/xfs/xfs_icache.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c index 8bf1d15be3f6..17a0b86fe701 100644 --- a/fs/xfs/xfs_icache.c +++ b/fs/xfs/xfs_icache.c @@ -423,6 +423,7 @@ xfs_iget_cache_hit( spin_unlock(&ip->i_flags_lock); rcu_read_unlock(); + ASSERT(!rwsem_is_locked(&inode->i_rwsem)); error = xfs_reinit_inode(mp, inode); if (error) { bool wake; @@ -456,9 +457,6 @@ xfs_iget_cache_hit( ip->i_sick = 0; ip->i_checked = 0; - ASSERT(!rwsem_is_locked(&inode->i_rwsem)); - init_rwsem(&inode->i_rwsem); - spin_unlock(&ip->i_flags_lock); spin_unlock(&pag->pag_ici_lock); } else { |