Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142634
b: refs/heads/master
c: dc498d0
h: refs/heads/master
v: v3
  • Loading branch information
Ryusuke Konishi authored and Linus Torvalds committed Apr 7, 2009
1 parent c1b8801 commit e527fe3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 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: 1088dcf4c3a0a27fdad5214781d5084b11405238
refs/heads/master: dc498d09be28172846cacded35ca2378222a8c7b
11 changes: 5 additions & 6 deletions trunk/fs/nilfs2/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ static int nilfs_ioctl_wrap_copy(struct the_nilfs *nilfs,
void *, size_t, size_t))
{
void *buf;
void __user *base = (void __user *)(unsigned long)argv->v_base;
size_t maxmembs, total, n;
ssize_t nr;
int ret, i;
Expand All @@ -64,9 +65,8 @@ static int nilfs_ioctl_wrap_copy(struct the_nilfs *nilfs,
n = (argv->v_nmembs - i < maxmembs) ?
argv->v_nmembs - i : maxmembs;
if ((dir & _IOC_WRITE) &&
copy_from_user(buf,
(void __user *)argv->v_base + argv->v_size * i,
argv->v_size * n)) {
copy_from_user(buf, base + argv->v_size * i,
argv->v_size * n)) {
ret = -EFAULT;
break;
}
Expand All @@ -78,9 +78,8 @@ static int nilfs_ioctl_wrap_copy(struct the_nilfs *nilfs,
break;
}
if ((dir & _IOC_READ) &&
copy_to_user(
(void __user *)argv->v_base + argv->v_size * i,
buf, argv->v_size * nr)) {
copy_to_user(base + argv->v_size * i, buf,
argv->v_size * nr)) {
ret = -EFAULT;
break;
}
Expand Down
23 changes: 14 additions & 9 deletions trunk/include/linux/nilfs2_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ NILFS_CHECKPOINT_FNS(SKETCH, sketch)
/**
* struct nilfs_cpinfo - checkpoint information
* @ci_flags: flags
* @ci_pad: padding
* @ci_cno: checkpoint number
* @ci_create: creation timestamp
* @ci_nblk_inc: number of blocks incremented by this checkpoint
Expand All @@ -508,6 +509,7 @@ NILFS_CHECKPOINT_FNS(SKETCH, sketch)
*/
struct nilfs_cpinfo {
__u32 ci_flags;
__u32 ci_pad;
__u64 ci_cno;
__u64 ci_create;
__u64 ci_nblk_inc;
Expand Down Expand Up @@ -668,23 +670,24 @@ enum {
*/
struct nilfs_cpmode {
__u64 cm_cno;
int cm_mode;
__u32 cm_mode;
__u32 cm_pad;
};

/**
* struct nilfs_argv - argument vector
* @v_base:
* @v_nmembs:
* @v_size:
* @v_index:
* @v_flags:
* @v_index:
*/
struct nilfs_argv {
void *v_base;
size_t v_nmembs; /* number of members */
size_t v_size; /* size of members */
int v_index;
int v_flags;
__u64 v_base;
__u32 v_nmembs; /* number of members */
__u16 v_size; /* size of members */
__u16 v_flags;
__u64 v_index;
};

/**
Expand Down Expand Up @@ -721,8 +724,8 @@ struct nilfs_sustat {
__u64 ss_nsegs;
__u64 ss_ncleansegs;
__u64 ss_ndirtysegs;
time_t ss_ctime;
time_t ss_nongc_ctime;
__u64 ss_ctime;
__u64 ss_nongc_ctime;
};

/**
Expand Down Expand Up @@ -750,6 +753,7 @@ struct nilfs_vdesc {
__u64 vd_blocknr;
__u64 vd_offset;
__u32 vd_flags;
__u32 vd_pad;
};

/**
Expand All @@ -761,6 +765,7 @@ struct nilfs_bdesc {
__u64 bd_blocknr;
__u64 bd_offset;
__u32 bd_level;
__u32 bd_pad;
};

#define NILFS_IOCTL_IDENT 'n'
Expand Down

0 comments on commit e527fe3

Please sign in to comment.