Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180363
b: refs/heads/master
c: 34e6c59
h: refs/heads/master
i:
  180361: de7d647
  180359: fd8f3b4
v: v3
  • Loading branch information
Tao Ma authored and Joel Becker committed Feb 3, 2010
1 parent 1c804a6 commit a39be2c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cd34edd8cf80b507bb84b3f0c2988fe05099ffb5
refs/heads/master: 34e6c59af06cbca07b1490ec0015ea2d303470d3
14 changes: 13 additions & 1 deletion trunk/fs/ocfs2/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <linux/fs.h>
#include <linux/mount.h>
#include <linux/compat.h>

#define MLOG_MASK_PREFIX ML_INODE
#include <cluster/masklog.h>
Expand Down Expand Up @@ -181,6 +182,10 @@ long ocfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
#ifdef CONFIG_COMPAT
long ocfs2_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg)
{
bool preserve;
struct reflink_arguments args;
struct inode *inode = file->f_path.dentry->d_inode;

switch (cmd) {
case OCFS2_IOC32_GETFLAGS:
cmd = OCFS2_IOC_GETFLAGS;
Expand All @@ -195,8 +200,15 @@ long ocfs2_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg)
case OCFS2_IOC_GROUP_EXTEND:
case OCFS2_IOC_GROUP_ADD:
case OCFS2_IOC_GROUP_ADD64:
case OCFS2_IOC_REFLINK:
break;
case OCFS2_IOC_REFLINK:
if (copy_from_user(&args, (struct reflink_arguments *)arg,
sizeof(args)))
return -EFAULT;
preserve = (args.preserve != 0);

return ocfs2_reflink_ioctl(inode, compat_ptr(args.old_path),
compat_ptr(args.new_path), preserve);
default:
return -ENOIOCTLCMD;
}
Expand Down

0 comments on commit a39be2c

Please sign in to comment.