@@ -824,14 +824,13 @@ void ceph_mdsc_release_request(struct kref *kref)
824824 ceph_msg_put (req -> r_reply );
825825 if (req -> r_inode ) {
826826 ceph_put_cap_refs (ceph_inode (req -> r_inode ), CEPH_CAP_PIN );
827- /* avoid calling iput_final() in mds dispatch threads */
828- ceph_async_iput (req -> r_inode );
827+ iput (req -> r_inode );
829828 }
830829 if (req -> r_parent ) {
831830 ceph_put_cap_refs (ceph_inode (req -> r_parent ), CEPH_CAP_PIN );
832- ceph_async_iput (req -> r_parent );
831+ iput (req -> r_parent );
833832 }
834- ceph_async_iput (req -> r_target_inode );
833+ iput (req -> r_target_inode );
835834 if (req -> r_dentry )
836835 dput (req -> r_dentry );
837836 if (req -> r_old_dentry )
@@ -845,7 +844,7 @@ void ceph_mdsc_release_request(struct kref *kref)
845844 */
846845 ceph_put_cap_refs (ceph_inode (req -> r_old_dentry_dir ),
847846 CEPH_CAP_PIN );
848- ceph_async_iput (req -> r_old_dentry_dir );
847+ iput (req -> r_old_dentry_dir );
849848 }
850849 kfree (req -> r_path1 );
851850 kfree (req -> r_path2 );
@@ -960,8 +959,7 @@ static void __unregister_request(struct ceph_mds_client *mdsc,
960959 }
961960
962961 if (req -> r_unsafe_dir ) {
963- /* avoid calling iput_final() in mds dispatch threads */
964- ceph_async_iput (req -> r_unsafe_dir );
962+ iput (req -> r_unsafe_dir );
965963 req -> r_unsafe_dir = NULL ;
966964 }
967965
@@ -1132,7 +1130,7 @@ static int __choose_mds(struct ceph_mds_client *mdsc,
11321130 cap = rb_entry (rb_first (& ci -> i_caps ), struct ceph_cap , ci_node );
11331131 if (!cap ) {
11341132 spin_unlock (& ci -> i_ceph_lock );
1135- ceph_async_iput (inode );
1133+ iput (inode );
11361134 goto random ;
11371135 }
11381136 mds = cap -> session -> s_mds ;
@@ -1141,9 +1139,7 @@ static int __choose_mds(struct ceph_mds_client *mdsc,
11411139 cap == ci -> i_auth_cap ? "auth " : "" , cap );
11421140 spin_unlock (& ci -> i_ceph_lock );
11431141out :
1144- /* avoid calling iput_final() while holding mdsc->mutex or
1145- * in mds dispatch threads */
1146- ceph_async_iput (inode );
1142+ iput (inode );
11471143 return mds ;
11481144
11491145random :
@@ -1546,9 +1542,7 @@ int ceph_iterate_session_caps(struct ceph_mds_session *session,
15461542 spin_unlock (& session -> s_cap_lock );
15471543
15481544 if (last_inode ) {
1549- /* avoid calling iput_final() while holding
1550- * s_mutex or in mds dispatch threads */
1551- ceph_async_iput (last_inode );
1545+ iput (last_inode );
15521546 last_inode = NULL ;
15531547 }
15541548 if (old_cap ) {
@@ -1582,7 +1576,7 @@ int ceph_iterate_session_caps(struct ceph_mds_session *session,
15821576 session -> s_cap_iterator = NULL ;
15831577 spin_unlock (& session -> s_cap_lock );
15841578
1585- ceph_async_iput (last_inode );
1579+ iput (last_inode );
15861580 if (old_cap )
15871581 ceph_put_cap (session -> s_mdsc , old_cap );
15881582
@@ -1722,8 +1716,7 @@ static void remove_session_caps(struct ceph_mds_session *session)
17221716 spin_unlock (& session -> s_cap_lock );
17231717
17241718 inode = ceph_find_inode (sb , vino );
1725- /* avoid calling iput_final() while holding s_mutex */
1726- ceph_async_iput (inode );
1719+ iput (inode );
17271720
17281721 spin_lock (& session -> s_cap_lock );
17291722 }
@@ -4369,8 +4362,7 @@ static void handle_lease(struct ceph_mds_client *mdsc,
43694362
43704363out :
43714364 mutex_unlock (& session -> s_mutex );
4372- /* avoid calling iput_final() in mds dispatch threads */
4373- ceph_async_iput (inode );
4365+ iput (inode );
43744366 return ;
43754367
43764368bad :
0 commit comments