From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Howells Subject: [PATCH 14/30] NFS: Make better use of inode* dereferencing macros [try #11] Date: Thu, 27 Jul 2006 21:52:58 +0100 Message-ID: <20060727205258.8443.63100.stgit@warthog.cambridge.redhat.com> References: <20060727205222.8443.29381.stgit@warthog.cambridge.redhat.com> Reply-To: Linux filesystem caching discussion list Content-Type: text/plain; charset=utf-8; format=fixed Content-Transfer-Encoding: quoted-printable Cc: linux-fsdevel@vger.kernel.org, linux-cachefs@redhat.com, nfsv4@linux-nfs.org, linux-kernel@vger.kernel.org Return-path: To: torvalds@osdl.org, akpm@osdl.org, steved@redhat.com, trond.myklebust@fys.uio.no In-Reply-To: <20060727205222.8443.29381.stgit@warthog.cambridge.redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-cachefs-bounces@redhat.com Errors-To: linux-cachefs-bounces@redhat.com List-Id: linux-fsdevel.vger.kernel.org Make better use of inode* dereferencing macros to hide dereferencing chai= ns (including NFS_PROTO and NFS_CLIENT). Signed-Off-By: David Howells Signed-off-by: Trond Myklebust --- fs/nfs/file.c | 2 +- fs/nfs/nfs4proc.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/nfs/file.c b/fs/nfs/file.c index cc2b874..52f161d 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -111,7 +111,7 @@ nfs_file_open(struct inode *inode, struc =20 nfs_inc_stats(inode, NFSIOS_VFSOPEN); lock_kernel(); - res =3D NFS_SERVER(inode)->rpc_ops->file_open(inode, filp); + res =3D NFS_PROTO(inode)->file_open(inode, filp); unlock_kernel(); return res; } diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index a3adfb1..74b9163 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -1268,7 +1268,7 @@ nfs4_atomic_open(struct inode *dir, stru BUG_ON(nd->intent.open.flags & O_CREAT); } =20 - cred =3D rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0); + cred =3D rpcauth_lookupcred(NFS_CLIENT(dir)->cl_auth, 0); if (IS_ERR(cred)) return (struct dentry *)cred; state =3D nfs4_do_open(dir, dentry, nd->intent.open.flags, &attr, cred)= ; @@ -1291,7 +1291,7 @@ nfs4_open_revalidate(struct inode *dir,=20 struct rpc_cred *cred; struct nfs4_state *state; =20 - cred =3D rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0); + cred =3D rpcauth_lookupcred(NFS_CLIENT(dir)->cl_auth, 0); if (IS_ERR(cred)) return PTR_ERR(cred); state =3D nfs4_open_delegated(dentry->d_inode, openflags, cred); @@ -1565,7 +1565,7 @@ nfs4_proc_setattr(struct dentry *dentry, =20 nfs_fattr_init(fattr); =09 - cred =3D rpcauth_lookupcred(NFS_SERVER(inode)->client->cl_auth, 0); + cred =3D rpcauth_lookupcred(NFS_CLIENT(inode)->cl_auth, 0); if (IS_ERR(cred)) return PTR_ERR(cred); =20 @@ -1927,7 +1927,7 @@ nfs4_proc_create(struct inode *dir, stru struct rpc_cred *cred; int status =3D 0; =20 - cred =3D rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0); + cred =3D rpcauth_lookupcred(NFS_CLIENT(dir)->cl_auth, 0); if (IS_ERR(cred)) { status =3D PTR_ERR(cred); goto out; @@ -2803,7 +2803,7 @@ static int nfs4_proc_set_acl(struct inod return -EOPNOTSUPP; nfs_inode_return_delegation(inode); buf_to_pages(buf, buflen, arg.acl_pages, &arg.acl_pgbase); - ret =3D rpc_call_sync(NFS_SERVER(inode)->client, &msg, 0); + ret =3D rpc_call_sync(NFS_CLIENT(inode), &msg, 0); if (ret =3D=3D 0) nfs4_write_cached_acl(inode, buf, buflen); return ret;