xfs
[Top] [All Lists]

Re: [PATCH] xfs: make several functions static

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH] xfs: make several functions static
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 1 Jun 2016 11:42:14 +1000
Cc: xfs-oss <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <3ec4e394-1885-6f3e-f909-c9a77a72668b@xxxxxxxxxxx>
References: <3ec4e394-1885-6f3e-f909-c9a77a72668b@xxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, May 19, 2016 at 02:16:25PM -0500, Eric Sandeen wrote:
> Al Viro noticed that xfs_lock_inodes should be static, and
> that led to ... a few more.
> 
> These are just the easy ones, others require moving functions
> higher in source files, so that's not done here to keep
> this review simple.
....
> diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
> index c5d4eba..04afe38 100644
> --- a/fs/xfs/xfs_iops.c
> +++ b/fs/xfs/xfs_iops.c
> @@ -524,7 +524,7 @@ xfs_setattr_mode(
>       inode->i_mode |= mode & ~S_IFMT;
>  }
>  
> -void
> +static void
>  xfs_setattr_time(
>       struct xfs_inode        *ip,
>       struct iattr            *iattr)
> diff --git a/fs/xfs/xfs_iops.h b/fs/xfs/xfs_iops.h
> index a0f84ab..d4bcc29 100644
> --- a/fs/xfs/xfs_iops.h
> +++ b/fs/xfs/xfs_iops.h
> @@ -30,7 +30,6 @@ extern ssize_t xfs_vn_listxattr(struct dentry *, char 
> *data, size_t size);
>   */
>  #define XFS_ATTR_NOACL               0x01    /* Don't call posix_acl_chmod */
>  
> -extern void xfs_setattr_time(struct xfs_inode *ip, struct iattr *iattr);
>  extern int xfs_setattr_nonsize(struct xfs_inode *ip, struct iattr *vap,
>                              int flags);
>  extern int xfs_setattr_size(struct xfs_inode *ip, struct iattr *vap);

Just a note: xfs_pnfs.c uses this function, so it can't be made
static. I've dropped this hunk. Maybe add CONFIG_NFSD_PNFS=y to you
kernel config?

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>