X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fllite%2Fllite_nfs.c;h=38e27269003e9b6d911ffb73e747d1bb57c015b9;hp=c2cf74c60fcdb597ca5250f562387c7cb122fee8;hb=7e1758e5621df902c5942d100a75cebde8df0327;hpb=9d3a33b176a1b353603f3a204ae1e818c05226c5 diff --git a/lustre/llite/llite_nfs.c b/lustre/llite/llite_nfs.c index c2cf74c..38e2726 100644 --- a/lustre/llite/llite_nfs.c +++ b/lustre/llite/llite_nfs.c @@ -194,13 +194,22 @@ static int ll_encode_fh(struct inode *inode, __u32 *fh, int *plen, RETURN(FILEID_LUSTRE); } -static int ll_nfs_get_name_filldir(void *cookie, const char *name, int namelen, - loff_t hash, u64 ino, unsigned type) +static int +#ifndef HAVE_FILLDIR_USE_CTX +ll_nfs_get_name_filldir(void *cookie, const char *name, int namelen, + loff_t hash, u64 ino, unsigned type) { + struct ll_getname_data *lgd = cookie; +#else +ll_nfs_get_name_filldir(struct dir_context *ctx, const char *name, int namelen, + loff_t hash, u64 ino, unsigned type) +{ + struct ll_getname_data *lgd = + container_of(ctx, struct ll_getname_data, ctx); +#endif /* HAVE_FILLDIR_USE_CTX */ /* It is hack to access lde_fid for comparison with lgd_fid. * So the input 'name' must be part of the 'lu_dirent'. */ struct lu_dirent *lde = container_of0(name, struct lu_dirent, lde_name); - struct ll_getname_data *lgd = cookie; struct lu_fid fid; fid_le_to_cpu(&fid, &lde->lde_fid);