@@ -13497,7 +13497,7 @@ class C_MDC_DataUninlinedSubmitted : public MDCacheLogContext {
1349713497
1349813498 void finish (int r) {
1349913499 auto mds = get_mds (); // to keep dout happy
13500- auto in = mds-> server -> rdlock_path_pin_ref (mdr, true ) ;
13500+ auto in = mdr-> in [ 0 ] ;
1350113501
1350213502 ceph_assert (in != nullptr );
1350313503
@@ -13514,6 +13514,7 @@ class C_MDC_DataUninlinedSubmitted : public MDCacheLogContext {
1351413514 h->record_uninline_passed ();
1351513515 in->uninline_finished ();
1351613516 mdr->apply ();
13517+ in->auth_unpin (this ); // for uninline data
1351713518 mds->server ->respond_to_request (mdr, r);
1351813519 }
1351913520};
@@ -13530,7 +13531,9 @@ struct C_IO_DataUninlined : public MDSIOContext {
1353013531
1353113532 void finish (int r) override {
1353213533 auto mds = get_mds (); // to keep dout/derr happy
13533- auto in = mds->server ->rdlock_path_pin_ref (mdr, true );
13534+ auto in = mdr->in [0 ];
13535+
13536+ ceph_assert (in != nullptr );
1353413537
1353513538 // return faster if operation has failed (non-zero) status
1353613539 if (r) {
@@ -13544,6 +13547,7 @@ struct C_IO_DataUninlined : public MDSIOContext {
1354413547 in->make_path_string (path);
1354513548 h->record_uninline_status (in->ino (), r, path);
1354613549 in->uninline_finished ();
13550+ in->auth_unpin (this ); // for uninline data
1354713551 mds->server ->respond_to_request (mdr, r);
1354813552 return ;
1354913553 }
@@ -13585,11 +13589,9 @@ struct C_IO_DataUninlined : public MDSIOContext {
1358513589
1358613590void MDCache::uninline_data_work (MDRequestRef mdr)
1358713591{
13588- CInode *in = mds-> server -> rdlock_path_pin_ref (mdr, true ) ;
13592+ CInode *in = mdr-> in [ 0 ] ;
1358913593
13590- if (!in) {
13591- return ;
13592- }
13594+ ceph_assert (in != nullptr );
1359313595
1359413596 MutationImpl::LockOpVec lov;
1359513597 lov.add_xlock (&in->authlock );
@@ -13604,6 +13606,7 @@ void MDCache::uninline_data_work(MDRequestRef mdr)
1360413606 if (!in->has_inline_data ()) {
1360513607 dout (20 ) << " (uninline_data) inode doesn't have inline data anymore " << *in << dendl;
1360613608 in->uninline_finished ();
13609+ in->auth_unpin (this ); // for uninline_data
1360713610 mds->server ->respond_to_request (mdr, 0 );
1360813611 return ;
1360913612 }
0 commit comments