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 10:51:14AM -0700, Matthew Wilcox wrote:
> 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)

Oops.  Typed too fast:

	if (NFS_SERVER(file_inode(file_in)))->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 Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux