Skip to content

Commit

Permalink
aufs3.16 base patch
Browse files Browse the repository at this point in the history
  • Loading branch information
sfjro authored and ppisa committed Aug 24, 2014
1 parent 1d2f54f commit 6a730ac
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 6 deletions.
18 changes: 18 additions & 0 deletions drivers/block/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,24 @@ static inline int is_loop_device(struct file *file)
return i && S_ISBLK(i->i_mode) && MAJOR(i->i_rdev) == LOOP_MAJOR;
}

/*
* for AUFS
* no get/put for file.
*/
struct file *loop_backing_file(struct super_block *sb)
{
struct file *ret;
struct loop_device *l;

ret = NULL;
if (MAJOR(sb->s_dev) == LOOP_MAJOR) {
l = sb->s_bdev->bd_disk->private_data;
ret = l->lo_backing_file;
}
return ret;
}
EXPORT_SYMBOL(loop_backing_file);

/* loop sysfs attributes */

static ssize_t loop_attr_show(struct device *dev, char *page,
Expand Down
2 changes: 1 addition & 1 deletion fs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1496,7 +1496,7 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
* This does the actual work of updating an inodes time or version. Must have
* had called mnt_want_write() before calling this.
*/
static int update_time(struct inode *inode, struct timespec *time, int flags)
int update_time(struct inode *inode, struct timespec *time, int flags)
{
if (inode->i_op->update_time)
return inode->i_op->update_time(inode, time, flags);
Expand Down
10 changes: 5 additions & 5 deletions fs/splice.c
Original file line number Diff line number Diff line change
Expand Up @@ -1114,8 +1114,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
/*
* Attempt to initiate a splice from pipe to file.
*/
static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
loff_t *ppos, size_t len, unsigned int flags)
long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
loff_t *ppos, size_t len, unsigned int flags)
{
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
loff_t *, size_t, unsigned int);
Expand All @@ -1131,9 +1131,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
/*
* Attempt to initiate a splice from a file to a pipe.
*/
static long do_splice_to(struct file *in, loff_t *ppos,
struct pipe_inode_info *pipe, size_t len,
unsigned int flags)
long do_splice_to(struct file *in, loff_t *ppos,
struct pipe_inode_info *pipe, size_t len,
unsigned int flags)
{
ssize_t (*splice_read)(struct file *, loff_t *,
struct pipe_inode_info *, size_t, unsigned int);
Expand Down
1 change: 1 addition & 0 deletions include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2618,6 +2618,7 @@ extern int inode_change_ok(const struct inode *, struct iattr *);
extern int inode_newsize_ok(const struct inode *, loff_t offset);
extern void setattr_copy(struct inode *inode, const struct iattr *attr);

extern int update_time(struct inode *, struct timespec *, int);
extern int file_update_time(struct file *file);

extern int generic_show_options(struct seq_file *m, struct dentry *root);
Expand Down
6 changes: 6 additions & 0 deletions include/linux/splice.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,10 @@ extern void splice_shrink_spd(struct splice_pipe_desc *);
extern void spd_release_page(struct splice_pipe_desc *, unsigned int);

extern const struct pipe_buf_operations page_cache_pipe_buf_ops;

extern long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
loff_t *ppos, size_t len, unsigned int flags);
extern long do_splice_to(struct file *in, loff_t *ppos,
struct pipe_inode_info *pipe, size_t len,
unsigned int flags);
#endif

0 comments on commit 6a730ac

Please sign in to comment.