Re: [PATCH] cifs: Allow nfsd over cifs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 28, 2011 at 03:52:41PM -0600, shirishpargaonkar@xxxxxxxxx wrote:
> +static struct dentry *
> +cifs_fh_to_dentry(struct super_block *sb, struct fid *fh,
> +			int fh_len, int fh_type)
> +{
> +	struct cifs_fid *cfid = (struct cifs_fid *)fh;
> +	struct inode *inode = NULL;
> +	struct cifs_fattr fattr;
> +
>  
> -#endif /* CIFS_NFSD_EXPORT */
> +	if (fh_type != FILEID_INO32_GEN && fh_type != FILEID_INO32_GEN_PARENT) {
> +		cERROR(1, "%s: Can't handle fh type: %d", __func__, fh_type);
> +		return ERR_PTR(-EINVAL);
> +	}
>  
> +	if (!cfid->cino)
> +		return ERR_PTR(-ESTALE);
> +
> +	fattr.cf_uniqueid = cfid->cino;
> +	inode = iget5_locked(sb, cfid->cino, cifs_find_inode_id,
> +					cifs_init_inode, &fattr);
> +	if (IS_ERR(inode))
> +		return ERR_CAST(inode);
> +
> +	return d_obtain_alias(inode);

Does the cifs protocol give the client a way to look up a file by inode
number (or filehandle or equivalent?).

--b.
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux