diff options
author | Ira Weiny <ira.weiny@intel.com> | 2020-04-22 21:50:57 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-05-04 09:03:17 -0700 |
commit | d45344d6c49cf9863e1d526fc1d8cb27ab147148 (patch) | |
tree | 767fe7b61d0ec73c638edf2f23098c6f28d0c60b /fs/xfs | |
parent | 2f88f1efd02ddf76cb5973abc42474c4dac2b03a (diff) | |
download | linux-stable-d45344d6c49cf9863e1d526fc1d8cb27ab147148.tar.gz linux-stable-d45344d6c49cf9863e1d526fc1d8cb27ab147148.tar.bz2 linux-stable-d45344d6c49cf9863e1d526fc1d8cb27ab147148.zip |
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 <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs')
-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 { |