@@ -682,7 +682,8 @@ void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry,
682
682
nfs_set_verifier (dentry , dir_verifier );
683
683
status = nfs_refresh_inode (d_inode (dentry ), entry -> fattr );
684
684
if (!status )
685
- nfs_setsecurity (d_inode (dentry ), entry -> fattr , entry -> label );
685
+ nfs_setsecurity (d_inode (dentry ), entry -> fattr ,
686
+ entry -> fattr -> label );
686
687
goto out ;
687
688
} else {
688
689
d_invalidate (dentry );
@@ -696,7 +697,7 @@ void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry,
696
697
goto out ;
697
698
}
698
699
699
- inode = nfs_fhget (dentry -> d_sb , entry -> fh , entry -> fattr , entry -> label );
700
+ inode = nfs_fhget (dentry -> d_sb , entry -> fh , entry -> fattr , entry -> fattr -> label );
700
701
alias = d_splice_alias (inode , dentry );
701
702
d_lookup_done (dentry );
702
703
if (alias ) {
@@ -732,8 +733,8 @@ static int nfs_readdir_page_filler(struct nfs_readdir_descriptor *desc,
732
733
xdr_set_scratch_page (& stream , scratch );
733
734
734
735
do {
735
- if (entry -> label )
736
- entry -> label -> len = NFS4_MAXLABELLEN ;
736
+ if (entry -> fattr -> label )
737
+ entry -> fattr -> label -> len = NFS4_MAXLABELLEN ;
737
738
738
739
status = xdr_decode (desc , entry , & stream );
739
740
if (status != 0 )
@@ -838,21 +839,15 @@ static int nfs_readdir_xdr_to_array(struct nfs_readdir_descriptor *desc,
838
839
return - ENOMEM ;
839
840
entry -> cookie = nfs_readdir_page_last_cookie (page );
840
841
entry -> fh = nfs_alloc_fhandle ();
841
- entry -> fattr = nfs_alloc_fattr ( );
842
+ entry -> fattr = nfs_alloc_fattr_with_label ( NFS_SERVER ( inode ) );
842
843
entry -> server = NFS_SERVER (inode );
843
844
if (entry -> fh == NULL || entry -> fattr == NULL )
844
845
goto out ;
845
846
846
- entry -> label = nfs4_label_alloc (NFS_SERVER (inode ), GFP_NOWAIT );
847
- if (IS_ERR (entry -> label )) {
848
- status = PTR_ERR (entry -> label );
849
- goto out ;
850
- }
851
-
852
847
array_size = (dtsize + PAGE_SIZE - 1 ) >> PAGE_SHIFT ;
853
848
pages = nfs_readdir_alloc_pages (array_size );
854
849
if (!pages )
855
- goto out_release_label ;
850
+ goto out ;
856
851
857
852
do {
858
853
unsigned int pglen ;
@@ -875,8 +870,6 @@ static int nfs_readdir_xdr_to_array(struct nfs_readdir_descriptor *desc,
875
870
} while (!status && nfs_readdir_page_needs_filling (page ));
876
871
877
872
nfs_readdir_free_pages (pages , array_size );
878
- out_release_label :
879
- nfs4_label_free (entry -> label );
880
873
out :
881
874
nfs_free_fattr (entry -> fattr );
882
875
nfs_free_fhandle (entry -> fh );
0 commit comments