summaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2015-02-24 07:22:28 -0600
committerBob Peterson <rpeterso@redhat.com>2015-03-18 12:43:09 -0500
commitf1ea6f4ec0a48d7b6bbf4d380a0ac14d69fadb44 (patch)
tree8fc4351a634a15c4bad5a9eb82f1b1b5ea976442 /fs/gfs2
parentf42a69fadc4b90b5d59c4672dcbe52dcd4b6a117 (diff)
downloadop-kernel-dev-f1ea6f4ec0a48d7b6bbf4d380a0ac14d69fadb44.zip
op-kernel-dev-f1ea6f4ec0a48d7b6bbf4d380a0ac14d69fadb44.tar.gz
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')
-rw-r--r--fs/gfs2/file.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 556d774..7353c0a 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -931,6 +931,22 @@ out_uninit:
return ret;
}
+static ssize_t gfs2_file_splice_write(struct pipe_inode_info *pipe,
+ struct file *out, loff_t *ppos,
+ size_t len, unsigned int flags)
+{
+ int error;
+ struct gfs2_inode *ip = GFS2_I(out->f_mapping->host);
+
+ error = gfs2_rs_alloc(ip);
+ if (error)
+ return (ssize_t)error;
+
+ gfs2_size_hint(out, *ppos, len);
+
+ return iter_file_splice_write(pipe, out, ppos, len, flags);
+}
+
#ifdef CONFIG_GFS2_FS_LOCKING_DLM
/**
@@ -1063,22 +1079,6 @@ static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl)
}
}
-static ssize_t gfs2_file_splice_write(struct pipe_inode_info *pipe,
- struct file *out, loff_t *ppos,
- size_t len, unsigned int flags)
-{
- int error;
- struct gfs2_inode *ip = GFS2_I(out->f_mapping->host);
-
- error = gfs2_rs_alloc(ip);
- if (error)
- return (ssize_t)error;
-
- gfs2_size_hint(out, *ppos, len);
-
- return iter_file_splice_write(pipe, out, ppos, len, flags);
-}
-
const struct file_operations gfs2_file_fops = {
.llseek = gfs2_llseek,
.read = new_sync_read,
OpenPOWER on IntegriCloud