Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107457
b: refs/heads/master
c: 9f8868f
h: refs/heads/master
i:
  107455: 4fc8f40
v: v3
  • Loading branch information
Christoph Hellwig authored and Niv Sardi committed Jul 28, 2008
1 parent 1a668b6 commit 6acb45b
Show file tree
Hide file tree
Showing 15 changed files with 319 additions and 222 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 136f8f21b6d564f553abe6130127d16fb50432d3
refs/heads/master: 9f8868ffb39c2f80ba69df4552cb530b6634f646
15 changes: 12 additions & 3 deletions trunk/fs/xfs/linux-2.6/xfs_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,21 @@ xfs_read_xfsstats(
return len;
}

void
int
xfs_init_procfs(void)
{
if (!proc_mkdir("fs/xfs", NULL))
return;
create_proc_read_entry("fs/xfs/stat", 0, NULL, xfs_read_xfsstats, NULL);
goto out;

if (!create_proc_read_entry("fs/xfs/stat", 0, NULL,
xfs_read_xfsstats, NULL))
goto out_remove_entry;
return 0;

out_remove_entry:
remove_proc_entry("fs/xfs", NULL);
out:
return -ENOMEM;
}

void
Expand Down
11 changes: 8 additions & 3 deletions trunk/fs/xfs/linux-2.6/xfs_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ DECLARE_PER_CPU(struct xfsstats, xfsstats);
#define XFS_STATS_DEC(v) (per_cpu(xfsstats, current_cpu()).v--)
#define XFS_STATS_ADD(v, inc) (per_cpu(xfsstats, current_cpu()).v += (inc))

extern void xfs_init_procfs(void);
extern int xfs_init_procfs(void);
extern void xfs_cleanup_procfs(void);


Expand All @@ -144,8 +144,13 @@ extern void xfs_cleanup_procfs(void);
# define XFS_STATS_DEC(count)
# define XFS_STATS_ADD(count, inc)

static inline void xfs_init_procfs(void) { };
static inline void xfs_cleanup_procfs(void) { };
static inline int xfs_init_procfs(void)
{
return 0
};
static inline void xfs_cleanup_procfs(void)
{
};

#endif /* !CONFIG_PROC_FS */

Expand Down
Loading

0 comments on commit 6acb45b

Please sign in to comment.