diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-02-20 16:02:51 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:00 -0400 |
commit | 55d474148982785dd8995dc690febad3a16a2c46 (patch) | |
tree | 28cf1f279f1842773db63516fae107a3bc5b9eab /fs | |
parent | 2e1a992e3103624af48f1501aaad4e4d8317f88c (diff) |
Btrfs: Disable sysfs files on older kernels
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/sysfs.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index 973d56e05698..1cf4f4f8d2ce 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "disk-io.h" | 28 | #include "disk-io.h" |
29 | #include "transaction.h" | 29 | #include "transaction.h" |
30 | 30 | ||
31 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) | ||
31 | static ssize_t root_blocks_used_show(struct btrfs_root *root, char *buf) | 32 | static ssize_t root_blocks_used_show(struct btrfs_root *root, char *buf) |
32 | { | 33 | { |
33 | return snprintf(buf, PAGE_SIZE, "%llu\n", | 34 | return snprintf(buf, PAGE_SIZE, "%llu\n", |
@@ -265,3 +266,36 @@ void btrfs_exit_sysfs() | |||
265 | { | 266 | { |
266 | kset_unregister(btrfs_kset); | 267 | kset_unregister(btrfs_kset); |
267 | } | 268 | } |
269 | |||
270 | #else | ||
271 | |||
272 | int btrfs_sysfs_add_super(struct btrfs_fs_info *fs) | ||
273 | { | ||
274 | return 0; | ||
275 | } | ||
276 | |||
277 | int btrfs_sysfs_add_root(struct btrfs_root *root) | ||
278 | { | ||
279 | return 0; | ||
280 | } | ||
281 | |||
282 | void btrfs_sysfs_del_root(struct btrfs_root *root) | ||
283 | { | ||
284 | return; | ||
285 | } | ||
286 | |||
287 | void btrfs_sysfs_del_super(struct btrfs_fs_info *fs) | ||
288 | { | ||
289 | return; | ||
290 | } | ||
291 | |||
292 | int btrfs_init_sysfs() | ||
293 | { | ||
294 | return 0; | ||
295 | } | ||
296 | |||
297 | void btrfs_exit_sysfs() | ||
298 | { | ||
299 | return; | ||
300 | } | ||
301 | #endif | ||