summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-09-24 11:48:04 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 15:41:59 -0400
commit2b1f55b0f0d0d1a66470ef4ea2696cd5dd741a12 (patch)
tree980019fac9b0891e682bc7d9a8c8a58284b467fc /fs/btrfs/file.c
parent9b49c9b9f93e148815f2544d0c91f43b6d72eea9 (diff)
downloadop-kernel-dev-2b1f55b0f0d0d1a66470ef4ea2696cd5dd741a12.zip
op-kernel-dev-2b1f55b0f0d0d1a66470ef4ea2696cd5dd741a12.tar.gz
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.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 48a702d..8856570 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,
goto out_nolock;
if (count == 0)
goto out_nolock;
-#ifdef REMOVE_SUID_PATH
- err = remove_suid(&file->f_path);
-#else
-# if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)
+
err = file_remove_suid(file);
-# else
- err = remove_suid(fdentry(file));
-# endif
-#endif
if (err)
goto out_nolock;
file_update_time(file);
@@ -1003,17 +996,10 @@ out_nolock:
btrfs_commit_transaction(trans, root);
}
} else if (num_written > 0 && (file->f_flags & O_DIRECT)) {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
- do_sync_file_range(file, start_pos,
- start_pos + num_written - 1,
- SYNC_FILE_RANGE_WRITE |
- SYNC_FILE_RANGE_WAIT_AFTER);
-#else
do_sync_mapping_range(inode->i_mapping, start_pos,
start_pos + num_written - 1,
SYNC_FILE_RANGE_WRITE |
SYNC_FILE_RANGE_WAIT_AFTER);
-#endif
invalidate_mapping_pages(inode->i_mapping,
start_pos >> PAGE_CACHE_SHIFT,
(start_pos + num_written - 1) >> PAGE_CACHE_SHIFT);
@@ -1097,12 +1083,7 @@ out:
}
static struct vm_operations_struct btrfs_file_vm_ops = {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
- .nopage = filemap_nopage,
- .populate = filemap_populate,
-#else
.fault = filemap_fault,
-#endif
.page_mkwrite = btrfs_page_mkwrite,
};
@@ -1118,9 +1099,6 @@ struct file_operations btrfs_file_operations = {
.read = do_sync_read,
.aio_read = generic_file_aio_read,
.splice_read = generic_file_splice_read,
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
- .sendfile = generic_file_sendfile,
-#endif
.write = btrfs_file_write,
.mmap = btrfs_file_mmap,
.open = generic_file_open,
OpenPOWER on IntegriCloud