Skip to content

Commit

Permalink
GFS2: Move gfs2_file_splice_write outside of #ifdef
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bob Peterson committed Mar 18, 2015
1 parent f42a69f commit f1ea6f4
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions fs/gfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,22 @@ static long gfs2_fallocate(struct file *file, int mode, loff_t offset, loff_t le
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

/**
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit f1ea6f4

Please sign in to comment.