>> + } else >> + err = nfsd_open_read(rqstp, fhp, offset, vec, vlen, count); > > The callers of nfsd_read are: > > fs/nfsd/nfs3proc.c: nfserr = nfsd_read(rqstp, &resp->fh, NULL, > fs/nfsd/nfs4proc.c: /* no need to check permission - this will be done in nfsd_read() */ > fs/nfsd/nfs4xdr.c: nfserr = nfsd_read(read->rd_rqstp, read->rd_fhp, read->rd_filp, > fs/nfsd/nfsproc.c: nfserr = nfsd_read(rqstp, fh_copy(&resp->fh, &argp->fh), NULL, > > which suggests that we're better off just calling nfsd_open_read > (possible with a better name) directly from fs/nfsd/nfs3proc.c and > fs/nfsd/nfsproc.c and nfsd_vfs_read directly from fs/nfsd/nfs4proc.c > and fs/nfsd/nfs4xdr.c instead of doing this conditional. > As bruce said, it should not be used for NFSv4. > -- > To unsubscribe from this list: send the line "unsubscribe linux-nfs" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > -- Regards Bian Naimeng -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html