aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-12-18 16:15:09 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:58 -0400
commit6da6abae027e2dbc59bca5f4168b0760f25068c7 (patch)
treea1e9c70c930e8b01baead984b706042067148788 /fs/btrfs/ctree.h
parentc59f8951d48c5eb000926935f3ab063d8181d1ee (diff)
Btrfs: Back port to 2.6.18-el kernels
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 32b24460ec82..2559f5d5d00a 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -19,6 +19,7 @@
19#ifndef __BTRFS__ 19#ifndef __BTRFS__
20#define __BTRFS__ 20#define __BTRFS__
21 21
22#include <linux/version.h>
22#include <linux/mm.h> 23#include <linux/mm.h>
23#include <linux/highmem.h> 24#include <linux/highmem.h>
24#include <linux/fs.h> 25#include <linux/fs.h>
@@ -334,7 +335,11 @@ struct btrfs_fs_info {
334 struct list_head trans_list; 335 struct list_head trans_list;
335 struct list_head hashers; 336 struct list_head hashers;
336 struct list_head dead_roots; 337 struct list_head dead_roots;
338#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
339 struct work_struct trans_work;
340#else
337 struct delayed_work trans_work; 341 struct delayed_work trans_work;
342#endif
338 struct kobject super_kobj; 343 struct kobject super_kobj;
339 struct completion kobj_unregister; 344 struct completion kobj_unregister;
340 int do_barriers; 345 int do_barriers;
@@ -916,6 +921,14 @@ static inline u32 btrfs_level_size(struct btrfs_root *root, int level) {
916 ((unsigned long)(btrfs_leaf_data(leaf) + \ 921 ((unsigned long)(btrfs_leaf_data(leaf) + \
917 btrfs_item_offset_nr(leaf, slot))) 922 btrfs_item_offset_nr(leaf, slot)))
918 923
924static inline struct dentry *fdentry(struct file *file) {
925#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
926 return file->f_dentry;
927#else
928 return file->f_path.dentry;
929#endif
930}
931
919/* extent-tree.c */ 932/* extent-tree.c */
920u32 btrfs_count_snapshots_in_path(struct btrfs_root *root, 933u32 btrfs_count_snapshots_in_path(struct btrfs_root *root,
921 struct btrfs_path *count_path, 934 struct btrfs_path *count_path,