diff options
author | Bob Peterson <rpeterso@redhat.com> | 2015-02-24 08:22:28 -0500 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2015-03-18 13:43:09 -0400 |
commit | f1ea6f4ec0a48d7b6bbf4d380a0ac14d69fadb44 (patch) | |
tree | 8fc4351a634a15c4bad5a9eb82f1b1b5ea976442 /fs/gfs2/file.c | |
parent | f42a69fadc4b90b5d59c4672dcbe52dcd4b6a117 (diff) |
GFS2: Move gfs2_file_splice_write outside of #ifdef
This patch moves function gfs2_file_splice_write so it's not
conditionally compiled.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Acked-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/file.c')
-rw-r--r-- | fs/gfs2/file.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 556d774f9aa9..7353c0a01a1e 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c | |||
@@ -931,6 +931,22 @@ out_uninit: | |||
931 | return ret; | 931 | return ret; |
932 | } | 932 | } |
933 | 933 | ||
934 | static ssize_t gfs2_file_splice_write(struct pipe_inode_info *pipe, | ||
935 | struct file *out, loff_t *ppos, | ||
936 | size_t len, unsigned int flags) | ||
937 | { | ||
938 | int error; | ||
939 | struct gfs2_inode *ip = GFS2_I(out->f_mapping->host); | ||
940 | |||
941 | error = gfs2_rs_alloc(ip); | ||
942 | if (error) | ||
943 | return (ssize_t)error; | ||
944 | |||
945 | gfs2_size_hint(out, *ppos, len); | ||
946 | |||
947 | return iter_file_splice_write(pipe, out, ppos, len, flags); | ||
948 | } | ||
949 | |||
934 | #ifdef CONFIG_GFS2_FS_LOCKING_DLM | 950 | #ifdef CONFIG_GFS2_FS_LOCKING_DLM |
935 | 951 | ||
936 | /** | 952 | /** |
@@ -1063,22 +1079,6 @@ static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl) | |||
1063 | } | 1079 | } |
1064 | } | 1080 | } |
1065 | 1081 | ||
1066 | static ssize_t gfs2_file_splice_write(struct pipe_inode_info *pipe, | ||
1067 | struct file *out, loff_t *ppos, | ||
1068 | size_t len, unsigned int flags) | ||
1069 | { | ||
1070 | int error; | ||
1071 | struct gfs2_inode *ip = GFS2_I(out->f_mapping->host); | ||
1072 | |||
1073 | error = gfs2_rs_alloc(ip); | ||
1074 | if (error) | ||
1075 | return (ssize_t)error; | ||
1076 | |||
1077 | gfs2_size_hint(out, *ppos, len); | ||
1078 | |||
1079 | return iter_file_splice_write(pipe, out, ppos, len, flags); | ||
1080 | } | ||
1081 | |||
1082 | const struct file_operations gfs2_file_fops = { | 1082 | const struct file_operations gfs2_file_fops = { |
1083 | .llseek = gfs2_llseek, | 1083 | .llseek = gfs2_llseek, |
1084 | .read = new_sync_read, | 1084 | .read = new_sync_read, |