@@ -415,13 +415,13 @@ int ovl_set_attr(struct ovl_fs *ofs, struct dentry *upperdentry,
415415 return err ;
416416}
417417
418- struct ovl_fh * ovl_encode_real_fh (struct ovl_fs * ofs , struct dentry * real ,
418+ struct ovl_fh * ovl_encode_real_fh (struct ovl_fs * ofs , struct inode * realinode ,
419419 bool is_upper )
420420{
421421 struct ovl_fh * fh ;
422422 int fh_type , dwords ;
423423 int buflen = MAX_HANDLE_SZ ;
424- uuid_t * uuid = & real -> d_sb -> s_uuid ;
424+ uuid_t * uuid = & realinode -> i_sb -> s_uuid ;
425425 int err ;
426426
427427 /* Make sure the real fid stays 32bit aligned */
@@ -438,7 +438,8 @@ struct ovl_fh *ovl_encode_real_fh(struct ovl_fs *ofs, struct dentry *real,
438438 * the price or reconnecting the dentry.
439439 */
440440 dwords = buflen >> 2 ;
441- fh_type = exportfs_encode_fh (real , (void * )fh -> fb .fid , & dwords , 0 );
441+ fh_type = exportfs_encode_inode_fh (realinode , (void * )fh -> fb .fid ,
442+ & dwords , NULL , 0 );
442443 buflen = (dwords << 2 );
443444
444445 err = - EIO ;
@@ -479,7 +480,7 @@ struct ovl_fh *ovl_get_origin_fh(struct ovl_fs *ofs, struct dentry *origin)
479480 if (!ovl_can_decode_fh (origin -> d_sb ))
480481 return NULL ;
481482
482- return ovl_encode_real_fh (ofs , origin , false);
483+ return ovl_encode_real_fh (ofs , d_inode ( origin ) , false);
483484}
484485
485486int ovl_set_origin_fh (struct ovl_fs * ofs , const struct ovl_fh * fh ,
@@ -504,7 +505,7 @@ static int ovl_set_upper_fh(struct ovl_fs *ofs, struct dentry *upper,
504505 const struct ovl_fh * fh ;
505506 int err ;
506507
507- fh = ovl_encode_real_fh (ofs , upper , true);
508+ fh = ovl_encode_real_fh (ofs , d_inode ( upper ) , true);
508509 if (IS_ERR (fh ))
509510 return PTR_ERR (fh );
510511
0 commit comments