Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84367
b: refs/heads/master
c: ef1fc2f
h: refs/heads/master
i:
  84365: 8f76df6
  84363: 4572ef3
  84359: 69d53ef
  84351: f2f23d9
v: v3
  • Loading branch information
Andi Kleen authored and Dave Kleikamp committed Feb 7, 2008
1 parent 7d8ff81 commit cb5a9f9
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: baab81fa518ecfac597402b462631f5593926623
refs/heads/master: ef1fc2f01e02951a0d8520ec3aa0b38606d74b55
3 changes: 3 additions & 0 deletions trunk/fs/jfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,7 @@ const struct file_operations jfs_file_operations = {
.fsync = jfs_fsync,
.release = jfs_release,
.unlocked_ioctl = jfs_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = jfs_compat_ioctl,
#endif
};
18 changes: 18 additions & 0 deletions trunk/fs/jfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,21 @@ long jfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
}
}

#ifdef CONFIG_COMPAT
long jfs_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
/* While these ioctl numbers defined with 'long' and have different
* numbers than the 64bit ABI,
* the actual implementation only deals with ints and is compatible.
*/
switch (cmd) {
case JFS_IOC_GETFLAGS32:
cmd = JFS_IOC_GETFLAGS;
break;
case JFS_IOC_SETFLAGS32:
cmd = JFS_IOC_SETFLAGS;
break;
}
return jfs_ioctl(filp, cmd, arg);
}
#endif
2 changes: 2 additions & 0 deletions trunk/fs/jfs/jfs_dinode.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,5 +170,7 @@ struct dinode {
#define JFS_IOC_GETFLAGS _IOR('f', 1, long)
#define JFS_IOC_SETFLAGS _IOW('f', 2, long)

#define JFS_IOC_GETFLAGS32 _IOR('f', 1, int)
#define JFS_IOC_SETFLAGS32 _IOW('f', 2, int)

#endif /*_H_JFS_DINODE */
1 change: 1 addition & 0 deletions trunk/fs/jfs/jfs_inode.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ struct fid;
extern struct inode *ialloc(struct inode *, umode_t);
extern int jfs_fsync(struct file *, struct dentry *, int);
extern long jfs_ioctl(struct file *, unsigned int, unsigned long);
extern long jfs_compat_ioctl(struct file *, unsigned int, unsigned long);
extern struct inode *jfs_iget(struct super_block *, unsigned long);
extern int jfs_commit_inode(struct inode *, int);
extern int jfs_write_inode(struct inode*, int);
Expand Down
3 changes: 3 additions & 0 deletions trunk/fs/jfs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1557,6 +1557,9 @@ const struct file_operations jfs_dir_operations = {
.readdir = jfs_readdir,
.fsync = jfs_fsync,
.unlocked_ioctl = jfs_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = jfs_compat_ioctl,
#endif
};

static int jfs_ci_hash(struct dentry *dir, struct qstr *this)
Expand Down

0 comments on commit cb5a9f9

Please sign in to comment.