On Tue, 2008-01-22 at 16:28 +0200, Benny Halevy wrote:
> Otherwise e.g., NFS_SERVER(&nfsi->vfs_inode) does not compile.
>
> Signed-off-by: Benny Halevy <[EMAIL PROTECTED]>
> ---
> include/linux/nfs_fs.h | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
> index 0477a4c..5a5d3fe 100644
> --- a/include/linux/nfs_fs.h
> +++ b/include/linux/nfs_fs.h
> @@ -221,10 +221,10 @@ static inline struct nfs_inode *NFS_I(struct inode
> *inode)
> {
> return container_of(inode, struct nfs_inode, vfs_inode);
> }
> -#define NFS_SB(s) ((struct nfs_server *)(s->s_fs_info))
> +#define NFS_SB(s) ((struct nfs_server *)((s)->s_fs_info))
>
> #define NFS_FH(inode) (&NFS_I(inode)->fh)
> -#define NFS_SERVER(inode) (NFS_SB(inode->i_sb))
> +#define NFS_SERVER(inode) (NFS_SB((inode)->i_sb))
> #define NFS_CLIENT(inode) (NFS_SERVER(inode)->client)
> #define NFS_PROTO(inode) (NFS_SERVER(inode)->nfs_client->rpc_ops)
> #define NFS_COOKIEVERF(inode) (NFS_I(inode)->cookieverf)
They should really be converted into inlined functions.
Cheers
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html