Re: [PATCH v5 12/12] NFS: replace cross device check in copy_file_range

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

 



On Mon, Oct 29, 2018 at 01:40:59PM -0400, Olga Kornievskaia wrote:
> +	c_in = (NFS_SERVER(file_inode(file_in)))->nfs_client;

Seems to be an unnecessary pair of brackets there, given existing code:

fs/nfs/delegation.c:    struct nfs_client *clp = NFS_SERVER(inode)->nfs_client;
fs/nfs/dir.c:                                     NFS_SERVER(inode)->dtsize, desc->plus);
fs/nfs/file.c:  if (NFS_SERVER(inode)->flags & NFS_MOUNT_LOCAL_FCNTL)
(etc)

> +	if (c_in->cl_minorversion < 2)

in fact, can't you make this even simpler ...

	if (NFS_SERVER(inode)->nfs_client->cl_minorversion < 2)

I thought you needed to cast it, but code like this:

fs/nfs/nfs4proc.c: NFS_SERVER(dir)->nfs_client->cl_hostname);

would indicate not.



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux