git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
fs
/
xfs
/
linux-2.6
/
xfs_ioctl.c
diff --git
a/fs/xfs/linux-2.6/xfs_ioctl.c
b/fs/xfs/linux-2.6/xfs_ioctl.c
index
4bbd092
..
0745d2b
100644
(file)
--- a/
fs/xfs/linux-2.6/xfs_ioctl.c
+++ b/
fs/xfs/linux-2.6/xfs_ioctl.c
@@
-107,9
+107,9
@@
xfs_find_handle(
if (!file)
return -EBADF;
if (!file)
return -EBADF;
- ASSERT(file->f_dentry);
- ASSERT(file->f_dentry->d_inode);
- inode = igrab(file->f_dentry->d_inode);
+ ASSERT(file->f_
path.
dentry);
+ ASSERT(file->f_
path.
dentry->d_inode);
+ inode = igrab(file->f_
path.
dentry->d_inode);
fput(file);
break;
}
fput(file);
break;
}
@@
-333,16
+333,19
@@
xfs_open_by_handle(
}
/* Ensure umount returns EBUSY on umounts while this file is open. */
}
/* Ensure umount returns EBUSY on umounts while this file is open. */
- mntget(parfilp->f_
vfs
mnt);
+ mntget(parfilp->f_
path.
mnt);
/* Create file pointer. */
/* Create file pointer. */
- filp = dentry_open(dentry, parfilp->f_
vfs
mnt, hreq.oflags);
+ filp = dentry_open(dentry, parfilp->f_
path.
mnt, hreq.oflags);
if (IS_ERR(filp)) {
put_unused_fd(new_fd);
return -XFS_ERROR(-PTR_ERR(filp));
}
if (IS_ERR(filp)) {
put_unused_fd(new_fd);
return -XFS_ERROR(-PTR_ERR(filp));
}
- if (inode->i_mode & S_IFREG)
+ if (inode->i_mode & S_IFREG) {
+ /* invisible operation should not change atime */
+ filp->f_flags |= O_NOATIME;
filp->f_op = &xfs_invis_file_operations;
filp->f_op = &xfs_invis_file_operations;
+ }
fd_install(new_fd, filp);
return new_fd;
fd_install(new_fd, filp);
return new_fd;
@@
-653,7
+656,7
@@
xfs_attrmulti_by_handle(
STATIC int
xfs_ioc_space(
bhv_desc_t *bdp,
STATIC int
xfs_ioc_space(
bhv_desc_t *bdp,
-
bhv_vnode_t *vp
,
+
struct inode *inode
,
struct file *filp,
int flags,
unsigned int cmd,
struct file *filp,
int flags,
unsigned int cmd,
@@
-735,7
+738,7
@@
xfs_ioctl(
!capable(CAP_SYS_ADMIN))
return -EPERM;
!capable(CAP_SYS_ADMIN))
return -EPERM;
- return xfs_ioc_space(bdp,
vp
, filp, ioflags, cmd, arg);
+ return xfs_ioc_space(bdp,
inode
, filp, ioflags, cmd, arg);
case XFS_IOC_DIOINFO: {
struct dioattr da;
case XFS_IOC_DIOINFO: {
struct dioattr da;
@@
-763,6
+766,8
@@
xfs_ioctl(
return xfs_ioc_fsgeometry(mp, arg);
case XFS_IOC_GETVERSION:
return xfs_ioc_fsgeometry(mp, arg);
case XFS_IOC_GETVERSION:
+ return put_user(inode->i_generation, (int __user *)arg);
+
case XFS_IOC_GETXFLAGS:
case XFS_IOC_SETXFLAGS:
case XFS_IOC_FSGETXATTR:
case XFS_IOC_GETXFLAGS:
case XFS_IOC_SETXFLAGS:
case XFS_IOC_FSGETXATTR:
@@
-957,7
+962,7
@@
xfs_ioctl(
STATIC int
xfs_ioc_space(
bhv_desc_t *bdp,
STATIC int
xfs_ioc_space(
bhv_desc_t *bdp,
-
bhv_vnode_t *vp
,
+
struct inode *inode
,
struct file *filp,
int ioflags,
unsigned int cmd,
struct file *filp,
int ioflags,
unsigned int cmd,
@@
-967,13
+972,13
@@
xfs_ioc_space(
int attr_flags = 0;
int error;
int attr_flags = 0;
int error;
- if (
vp->v_inode.
i_flags & (S_IMMUTABLE|S_APPEND))
+ if (
inode->
i_flags & (S_IMMUTABLE|S_APPEND))
return -XFS_ERROR(EPERM);
if (!(filp->f_mode & FMODE_WRITE))
return -XFS_ERROR(EBADF);
return -XFS_ERROR(EPERM);
if (!(filp->f_mode & FMODE_WRITE))
return -XFS_ERROR(EBADF);
- if (!
VN_ISREG(vp
))
+ if (!
S_ISREG(inode->i_mode
))
return -XFS_ERROR(EINVAL);
if (copy_from_user(&bf, arg, sizeof(bf)))
return -XFS_ERROR(EINVAL);
if (copy_from_user(&bf, arg, sizeof(bf)))
@@
-1270,13
+1275,6
@@
xfs_ioc_xattr(
break;
}
break;
}
- case XFS_IOC_GETVERSION: {
- flags = vn_to_inode(vp)->i_generation;
- if (copy_to_user(arg, &flags, sizeof(flags)))
- error = -EFAULT;
- break;
- }
-
default:
error = -ENOTTY;
break;
default:
error = -ENOTTY;
break;