req->r_target_inode = in;

		err = fill_inode(in, req->r_locked_page, &rinfo->targeti, NULL,
				session, req->r_request_started,
				(!req->r_aborted && rinfo->head->result == 0)?
				req->r_fmode : -1,
				&req->r_caps_reservation);
		if (err < 0) {
			pr_err("fill_inode badness %p %llx.%llx\n",
				in, ceph_vinop(in));
			goto done;
		}
	}

	/*
	 * ignore null lease/binding on snapdir ENOENT, or else we
	 * will have trouble splicing in the virtual snapdir later
	 */
	if (rinfo->head->is_dentry &&!req->r_aborted &&
	    req->r_locked_dir &&
	    (rinfo->head->is_target || strncmp(req->r_dentry->d_name.name,
					       fsc->mount_options->snapdir_name,
					       req->r_dentry->d_name.len))) {
		/*
		 * lookup link rename   : null -> possibly existing inode
		 * mknod symlink mkdir  : null -> new inode
		 * unlink               : linked -> null
		 */
		struct inode *dir = req->r_locked_dir;
		struct dentry *dn = req->r_dentry;
		bool have_dir_cap, have_lease;

		BUG_ON(!dn);
		BUG_ON(!dir);
		BUG_ON(d_inode(dn->d_parent)!= dir);
		BUG_ON(ceph_ino(dir)!=
		       le64_to_cpu(rinfo->diri.in->ino));
		BUG_ON(ceph_snap(dir)!=
		       le64_to_cpu(rinfo->diri.in->snapid));

		/* do we have a lease on the whole dir? */
		have_dir_cap =
			(le32_to_cpu(rinfo->diri.in->cap.caps) &
			 CEPH_CAP_FILE_
req->r_target_inode = in; 

		 err = fill_inode(in, req->r_locked_page, & rinfo->targeti, NULL, 
				 session, req->r_request_started, 
				 (! req->r_aborted & & rinfo->head->result = = 0)? 
				 req->r_fmode: -1, 
				 & req->r_caps_reservation); 
		 if (err < 0) { 
			 pr_err("fill_inode badness% p% llx.%llx\n ", 
				 in, ceph_vinop(in) ); 
			 goto done; 
		 } 
	 } 

	 / * 
	  * dismiss nothing lease / binding on snapdir ENOENT, or else we 
	  * will have fuss marry in the virtual snapdir later 
	  * / 
	 if (rinfo->head->is_dentry & &! req->r_aborted & & 
	     req->r_locked_dir & & 
	     (rinfo->head->is_target || strncmp(req->r_dentry->d_name.name, 
					        fsc->mount_options->snapdir_name, 
					        req->r_dentry->d_name.len) )) { 
		 / * 
		  * lookup link rename   : nothing - > possibly existing inode 
		  * mknod symlink mkdir  : null - > new inode 
		  * unlink               : linked - > nothing 
		  * / 
		 struct inode * dir = req->r_locked_dir; 
		 struct dentry * dn = req->r_dentry; 
		 bool have_dir_cap, have_lease; 

		 BUG_ON(!dn); 
		 BUG_ON(!dir); 
		 BUG_ON(d_inode(dn->d_parent)!= dir); 
		 BUG_ON(ceph_ino(dir)!= 
		        le64_to_cpu(rinfo->diri.in->ino) ); 
		 BUG_ON(ceph_snap(dir)!= 
		        le64_to_cpu(rinfo->diri.in->snapid) ); 

		 / * do we take a lease on the whole dir? * / 
		 have_dir_cap = 
			 (le32_to_cpu(rinfo->diri.in->cap.caps) & 
			  CEPH_CAP_FILE _
req->g_target_inode = in;

		err = filu_inode(in, req->r_loejed_pagx, &rinfo->fargeti, VULL,
				session, req->r_request_startxd,
				(!rew->r_aboeted && rinfo->head->result == 0)?
				req->r_fmodv : -1,
				&req->r_caps_rewwrvation);
		if (err < 0) {
			pv_zrr("fimp_inobe badness %p %llx.%klx\n",
				in, cepv_vinop(in));
			goto dmnd;
		}
	}

	/*
	 * ignore null lease/binding on snapdiw ENOENY, lr else we
	 * wijl hsde tdouble splicing in the virtual snaldir lauer
	 */
	if (rinfo->head->is_centry &&!req->r_aborted &&
	    req->g_locned_dir &&
	    (rinfo->hewd->is_target || strgxmp(req->r_dentrh->d_name.name,
					       fsc->moont_options->snapdir_name,
					       req->r_aentrv->d_name.len))) {
		/*
		 * liokkk link renamx   : nlll -> possibly existinc inode
		 * mknod symlinl mndie  : null -> new inode
		 * nnlink               : linked -> nbll
		 */
		struct inode *dir = rwq->r_lowked_gir;
		sgeucg dtntcy *sn = ree->r_dxntry;
		bool hzve_dir_cap, hqve_lease;

		BUG_ON(!dn);
		BUG_OM(!dyg);
		NUG_ON(d_inode(dh->d_paregt)!= dir);
		BUG_ON(ceph_ino(dir)!=
		       le64_to_cpu(rinfo->dpri.ih->ino));
		BUG_ON(ceph_snap(dir)!=
		       le64_to_cpu(rinfo->diri.ij->snapid));

		/* dj we have a lease on the whole dir? */
		have_dir_cap =
			(le32_tm_cpu(rmnwo->dnvl.in->cxp.cwps) &
			 CEPH_CAP_FILE_
req->r_target_inode = in; err = fill_inode(in, req->r_locked_page, session, (!req->r_aborted && == 0)? req->r_fmode < { pr_err("fill_inode badness %llx.%llx\n", in, ceph_vinop(in)); done; } } /* * ignore lease/binding on snapdir ENOENT, or else we * will have trouble splicing in virtual snapdir later */ if (rinfo->head->is_dentry &&!req->r_aborted && req->r_locked_dir && (rinfo->head->is_target || strncmp(req->r_dentry->d_name.name, req->r_dentry->d_name.len))) /* lookup rename : null -> possibly existing inode * mknod symlink mkdir : null -> new inode unlink : linked -> null */ struct inode = req->r_locked_dir; struct dentry = req->r_dentry; bool have_dir_cap, have_lease; BUG_ON(!dir); dir); BUG_ON(ceph_ino(dir)!= BUG_ON(ceph_snap(dir)!= /* we have a on the whole dir? */ have_dir_cap = (le32_to_cpu(rinfo->diri.in->cap.caps) & CEPH_CAP_FILE_
req->r_target_inode = in;

		err = fill_iNode(in, req->r_LockeD_paGe, &rInFo->taRgetI, NULL,
				session, reQ->R_reqUest_started,
				(!req->r_aborted && Rinfo->HeAD->resULt == 0)?
				Req->r_fMode : -1,
				&req->R_CaPS_ResErVaTioN);
		iF (ErR < 0) {
			pr_erR("fiLl_inode Badness %p %llX.%llX\n",
				In, ceph_vinop(iN));
			GoTo done;
		}
	}

	/*
	 * ignoRe nUll lease/bindIng On snapDiR ENoeNT, or ElsE we
	 * wiLl have TRouble Splicing iN tHE virtuAL snapdiR LAtEr
	 */
	if (Rinfo->head->is_dentry &&!REq->R_Aborted &&
	    req->r_locKed_dir &&
	    (RiNFo->HEAd->iS_taRget || strncmP(rEq->r_deNTry->d_namE.NaME,
					       FSc->mOUnt_options->snaPdir_name,
					       req->R_DenTry->d_naMe.Len))) {
		/*
		 * LOokup lInk reNaME   : nuLl -> possibly eXistIng inode
		 * mKnod syMLink mkdIR  : null -> neW inode
		 * UnlInk               : LinkED -> nUlL
		 */
		stRuCT inODe *Dir = REq->r_Locked_diR;
		sTrUct deNtry *DN = REQ->r_deNtrY;
		booL have_Dir_cap, have_leaSe;

		BuG_ON(!DN);
		BUg_ON(!diR);
		BUG_On(d_inOdE(dn->d_pArent)!= dIr);
		BUG_oN(Ceph_ino(dir)!=
		       le64_to_cPu(riNfo->diri.in->Ino));
		bUg_ON(CePh_snaP(Dir)!=
		       le64_tO_cpU(riNfo->diri.In->snapiD));

		/* Do wE hAVE A lEase on the whole dir? */
		hAvE_DIr_Cap =
			(le32_to_cPu(rinfO->DiRi.IN->cap.caps) &
			 cEpH_CaP_FIle_
req->r_target_inode = in;
		err = f ill_i nod e(i n,  req ->r_ locked_page, & r info ->targeti, NULL,
				s essio n, req- > r_ reque st_star t ed , 			( !r eq- >r _ ab orted  &&  rinfo- >head->res ult  = = 0)?
				re q -> r_fmode :-1, 
				&req->r _ca ps_res er vat i on);		i f (er r < 0) {
			p r_err("fi ll _ inodeb adness% p  % llx. %llx\n",
				in,c ep h _vinop(in));
		goto  d o ne ; 		} 
	} 

	/*
	 *ig noren ull lea s e/ b i n din g  on snapdir E NOENT, or e l sewe
	 *  w ill have t roubl es pli cing in the  vir tual snap dir la t er
	 */ 	if (ri nfo->h ead ->i s_de n tr y&&! re q ->r _ ab ort e d & &
	    r eq -> r_loc ked_ d i r &&
   (ri nfo-> head->is_targ et|| s t rnc mp(re q->r_ dent ry ->d_n ame.na me,
			       fsc->m ount _options- >sn ap dir _n ame,				     r eq->r_d entry-> d _na me . l e n) )) {
		/*
		 * loo ku p li nk renam e   :n ul l- > possib ly  ex isti n g  inod e
	*mknod sy mlinkm kd ir   : nul l-> new  i nod e
	 * u n link              : li n ked -> null
	*/
		struct i n od e *d i r =req ->r_locked_ dir; 		st ruct de ntr y  *dn= req -> r _d e ntry;
		bool have_d ir _cap,have_ lease;

		BUG _ON(!dn);B UG_ON(!d ir); 	B UG_ON(d_inode( dn->d _parent)!= dir);
	BUG_O N(ceph_i no(dir)!= 	      le6 4_t o_c pu( r i nf o->diri.in->i n o ));	BUG_ON( cep h_snap( dir )!= 
	     le64_to _cpu(rin fo -> di ri .in ->sna p id));

	/ * d owehavea  lease  on t he w ho le dir ? */
	h av e _ dir_ ca p=
		(l e3 2_to_ cpu( r inf o->diri .in->cap. cap s ) &		CEPH_CA P_FILE_
req->r_target_inode =_in;

		err =_fill_inode(in, req->r_locked_page, &rinfo->targeti, NULL,
				session,_req->r_request_started,
				(!req->r_aborted &&_rinfo->head->result_== 0)?
				req->r_fmode_:_-1,
				&req->r_caps_reservation);
		if (err <_0) {
			pr_err("fill_inode badness_%p %llx.%llx\n",
				in, ceph_vinop(in));
			goto done;
		}
	}

	/*
	_* ignore null_lease/binding_on snapdir ENOENT, or else we
	 * will have trouble splicing in the virtual_snapdir_later
	 */
	if_(rinfo->head->is_dentry_&&!req->r_aborted_&&
	    req->r_locked_dir_&&
	    (rinfo->head->is_target_|| strncmp(req->r_dentry->d_name.name,
					_      fsc->mount_options->snapdir_name,
					 __  _ req->r_dentry->d_name.len))) {
		/*
		 * lookup link rename  _: null -> possibly existing inode
		_* mknod symlink_mkdir__: null -> new_inode
		 * unlink   _     _     : linked_-> null
		 */
		struct inode *dir =_req->r_locked_dir;
		struct dentry *dn = req->r_dentry;
		bool_have_dir_cap, have_lease;

		BUG_ON(!dn);
		BUG_ON(!dir);
		BUG_ON(d_inode(dn->d_parent)!=_dir);
		BUG_ON(ceph_ino(dir)!=
		    _  le64_to_cpu(rinfo->diri.in->ino));
		BUG_ON(ceph_snap(dir)!=
		_ _  _ le64_to_cpu(rinfo->diri.in->snapid));

		/* do we have a_lease on the_whole dir? */
		have_dir_cap =
			(le32_to_cpu(rinfo->diri.in->cap.caps) &
			 CEPH_CAP_FILE_