| To: | Bill O'Donnell <billodo@xxxxxxxxxx>, xfs@xxxxxxxxxxx |
|---|---|
| Subject: | Re: [PATCH 2/3] xfs: create symlink proc/fs/xfs/stat to sys/fs/xfs/stats |
| From: | Eric Sandeen <sandeen@xxxxxxxxxxx> |
| Date: | Fri, 4 Sep 2015 13:32:52 -0500 |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1441371319-31625-3-git-send-email-billodo@xxxxxxxxxx> |
| References: | <1441371319-31625-1-git-send-email-billodo@xxxxxxxxxx> <1441371319-31625-3-git-send-email-billodo@xxxxxxxxxx> |
On 9/4/15 7:55 AM, Bill O'Donnell wrote:
> As a part of the work to move xfs global stats from procfs to sysfs,
> this patch creates the symlink from proc/fs/xfs/stat to sys/fs/xfs/stats.
>
> Signed-off-by: Bill O'Donnell <billodo@xxxxxxxxxx>
> ---
> fs/xfs/xfs_stats.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/fs/xfs/xfs_stats.c b/fs/xfs/xfs_stats.c
> index 6008e25..734b867 100644
> --- a/fs/xfs/xfs_stats.c
> +++ b/fs/xfs/xfs_stats.c
> @@ -244,9 +244,12 @@ xfs_init_procfs(void)
> if (!proc_mkdir("fs/xfs", NULL))
> goto out;
>
> - if (!proc_create("fs/xfs/stat", 0, NULL,
> - &xfs_stat_proc_fops))
> + if (!proc_symlink("fs/xfs/stat", NULL,
> + "/sys/fs/xfs/stats/stats"))
> + {
> goto out_remove_xfs_dir;
> + }
Ok, without the printk, now there's no need for the braces :)
Also, as an aside, the kernel/xfs style is:
if (foo) {
...
}
not:
if (foo)
{
...
}
just FYI...
Thanks,
-Eric
> +
> #ifdef CONFIG_XFS_QUOTA
> if (!proc_create("fs/xfs/xqmstat", 0, NULL,
> &xqmstat_proc_fops))
>
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Armee de Terre : 10 000 postes a pourvoir, Armee de Terre |
|---|---|
| Next by Date: | Re: [PATCH 1/3] xfs: create global stats and stats_clear in sysfs, Eric Sandeen |
| Previous by Thread: | [PATCH 2/3] xfs: create symlink proc/fs/xfs/stat to sys/fs/xfs/stats, Bill O'Donnell |
| Next by Thread: | [PATCH 3/3] xfs: remove unused procfs code, Bill O'Donnell |
| Indexes: | [Date] [Thread] [Top] [All Lists] |