diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-09-24 11:48:04 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 15:41:59 -0400 |
commit | 2b1f55b0f0d0d1a66470ef4ea2696cd5dd741a12 (patch) | |
tree | 980019fac9b0891e682bc7d9a8c8a58284b467fc /fs/btrfs/file.c | |
parent | 9b49c9b9f93e148815f2544d0c91f43b6d72eea9 (diff) |
Remove Btrfs compat code for older kernels
Btrfs had compatibility code for kernels back to 2.6.18. These have
been removed, and will be maintained in a separate backport
git tree from now on.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 48a702d41c8c..8856570a0ebd 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -871,15 +871,8 @@ static ssize_t btrfs_file_write(struct file *file, const char __user *buf, | |||
871 | goto out_nolock; | 871 | goto out_nolock; |
872 | if (count == 0) | 872 | if (count == 0) |
873 | goto out_nolock; | 873 | goto out_nolock; |
874 | #ifdef REMOVE_SUID_PATH | 874 | |
875 | err = remove_suid(&file->f_path); | ||
876 | #else | ||
877 | # if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26) | ||
878 | err = file_remove_suid(file); | 875 | err = file_remove_suid(file); |
879 | # else | ||
880 | err = remove_suid(fdentry(file)); | ||
881 | # endif | ||
882 | #endif | ||
883 | if (err) | 876 | if (err) |
884 | goto out_nolock; | 877 | goto out_nolock; |
885 | file_update_time(file); | 878 | file_update_time(file); |
@@ -1003,17 +996,10 @@ out_nolock: | |||
1003 | btrfs_commit_transaction(trans, root); | 996 | btrfs_commit_transaction(trans, root); |
1004 | } | 997 | } |
1005 | } else if (num_written > 0 && (file->f_flags & O_DIRECT)) { | 998 | } else if (num_written > 0 && (file->f_flags & O_DIRECT)) { |
1006 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) | ||
1007 | do_sync_file_range(file, start_pos, | ||
1008 | start_pos + num_written - 1, | ||
1009 | SYNC_FILE_RANGE_WRITE | | ||
1010 | SYNC_FILE_RANGE_WAIT_AFTER); | ||
1011 | #else | ||
1012 | do_sync_mapping_range(inode->i_mapping, start_pos, | 999 | do_sync_mapping_range(inode->i_mapping, start_pos, |
1013 | start_pos + num_written - 1, | 1000 | start_pos + num_written - 1, |
1014 | SYNC_FILE_RANGE_WRITE | | 1001 | SYNC_FILE_RANGE_WRITE | |
1015 | SYNC_FILE_RANGE_WAIT_AFTER); | 1002 | SYNC_FILE_RANGE_WAIT_AFTER); |
1016 | #endif | ||
1017 | invalidate_mapping_pages(inode->i_mapping, | 1003 | invalidate_mapping_pages(inode->i_mapping, |
1018 | start_pos >> PAGE_CACHE_SHIFT, | 1004 | start_pos >> PAGE_CACHE_SHIFT, |
1019 | (start_pos + num_written - 1) >> PAGE_CACHE_SHIFT); | 1005 | (start_pos + num_written - 1) >> PAGE_CACHE_SHIFT); |
@@ -1097,12 +1083,7 @@ out: | |||
1097 | } | 1083 | } |
1098 | 1084 | ||
1099 | static struct vm_operations_struct btrfs_file_vm_ops = { | 1085 | static struct vm_operations_struct btrfs_file_vm_ops = { |
1100 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) | ||
1101 | .nopage = filemap_nopage, | ||
1102 | .populate = filemap_populate, | ||
1103 | #else | ||
1104 | .fault = filemap_fault, | 1086 | .fault = filemap_fault, |
1105 | #endif | ||
1106 | .page_mkwrite = btrfs_page_mkwrite, | 1087 | .page_mkwrite = btrfs_page_mkwrite, |
1107 | }; | 1088 | }; |
1108 | 1089 | ||
@@ -1118,9 +1099,6 @@ struct file_operations btrfs_file_operations = { | |||
1118 | .read = do_sync_read, | 1099 | .read = do_sync_read, |
1119 | .aio_read = generic_file_aio_read, | 1100 | .aio_read = generic_file_aio_read, |
1120 | .splice_read = generic_file_splice_read, | 1101 | .splice_read = generic_file_splice_read, |
1121 | #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18) | ||
1122 | .sendfile = generic_file_sendfile, | ||
1123 | #endif | ||
1124 | .write = btrfs_file_write, | 1102 | .write = btrfs_file_write, |
1125 | .mmap = btrfs_file_mmap, | 1103 | .mmap = btrfs_file_mmap, |
1126 | .open = generic_file_open, | 1104 | .open = generic_file_open, |