@@ -4790,7 +4790,6 @@ static int _nfs4_proc_link(struct inode *inode, struct inode *dir, const struct
47904790 };
47914791 struct nfs4_link_res res = {
47924792 .server = server ,
4793- .label = NULL ,
47944793 };
47954794 struct rpc_message msg = {
47964795 .rpc_proc = & nfs4_procedures [NFSPROC4_CLNT_LINK ],
@@ -4799,18 +4798,12 @@ static int _nfs4_proc_link(struct inode *inode, struct inode *dir, const struct
47994798 };
48004799 int status = - ENOMEM ;
48014800
4802- res .fattr = nfs_alloc_fattr ( );
4801+ res .fattr = nfs_alloc_fattr_with_label ( server );
48034802 if (res .fattr == NULL )
48044803 goto out ;
48054804
4806- res .label = nfs4_label_alloc (server , GFP_KERNEL );
4807- if (IS_ERR (res .label )) {
4808- status = PTR_ERR (res .label );
4809- goto out ;
4810- }
4811-
48124805 nfs4_inode_make_writeable (inode );
4813- nfs4_bitmap_copy_adjust (bitmask , nfs4_bitmask (server , res .label ), inode ,
4806+ nfs4_bitmap_copy_adjust (bitmask , nfs4_bitmask (server , res .fattr -> label ), inode ,
48144807 NFS_INO_INVALID_CHANGE );
48154808 status = nfs4_call_sync (server -> client , server , & msg , & arg .seq_args , & res .seq_res , 1 );
48164809 if (!status ) {
@@ -4819,12 +4812,9 @@ static int _nfs4_proc_link(struct inode *inode, struct inode *dir, const struct
48194812 nfs4_inc_nlink (inode );
48204813 status = nfs_post_op_update_inode (inode , res .fattr );
48214814 if (!status )
4822- nfs_setsecurity (inode , res .fattr , res .label );
4815+ nfs_setsecurity (inode , res .fattr , res .fattr -> label );
48234816 }
48244817
4825-
4826- nfs4_label_free (res .label );
4827-
48284818out :
48294819 nfs_free_fattr (res .fattr );
48304820 return status ;
0 commit comments