diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/compat_ioctl.c | 8 | ||||
-rw-r--r-- | fs/debugfs/file.c | 6 | ||||
-rw-r--r-- | fs/inotify.c | 2 | ||||
-rw-r--r-- | fs/namei.c | 6 | ||||
-rw-r--r-- | fs/namespace.c | 58 | ||||
-rw-r--r-- | fs/nfs/nfsroot.c | 3 | ||||
-rw-r--r-- | fs/nfsd/nfs4proc.c | 6 | ||||
-rw-r--r-- | fs/reiserfs/hashes.c | 1 | ||||
-rw-r--r-- | fs/select.c | 4 | ||||
-rw-r--r-- | fs/super.c | 5 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_aops.c | 3 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_iops.c | 2 |
12 files changed, 64 insertions, 40 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 5dd0207ffd46..057e60217fc5 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -931,8 +931,8 @@ struct compat_sg_req_info { /* used by SG_GET_REQUEST_TABLE ioctl() */ | |||
931 | static int sg_grt_trans(unsigned int fd, unsigned int cmd, unsigned long arg) | 931 | static int sg_grt_trans(unsigned int fd, unsigned int cmd, unsigned long arg) |
932 | { | 932 | { |
933 | int err, i; | 933 | int err, i; |
934 | sg_req_info_t *r; | 934 | sg_req_info_t __user *r; |
935 | struct compat_sg_req_info *o = (struct compat_sg_req_info *)arg; | 935 | struct compat_sg_req_info __user *o = (void __user *)arg; |
936 | r = compat_alloc_user_space(sizeof(sg_req_info_t)*SG_MAX_QUEUE); | 936 | r = compat_alloc_user_space(sizeof(sg_req_info_t)*SG_MAX_QUEUE); |
937 | err = sys_ioctl(fd,cmd,(unsigned long)r); | 937 | err = sys_ioctl(fd,cmd,(unsigned long)r); |
938 | if (err < 0) | 938 | if (err < 0) |
@@ -2739,8 +2739,8 @@ static int do_ncp_setprivatedata(unsigned int fd, unsigned int cmd, unsigned lon | |||
2739 | static int | 2739 | static int |
2740 | lp_timeout_trans(unsigned int fd, unsigned int cmd, unsigned long arg) | 2740 | lp_timeout_trans(unsigned int fd, unsigned int cmd, unsigned long arg) |
2741 | { | 2741 | { |
2742 | struct compat_timeval *tc = (struct compat_timeval *)arg; | 2742 | struct compat_timeval __user *tc = (struct compat_timeval __user *)arg; |
2743 | struct timeval *tn = compat_alloc_user_space(sizeof(struct timeval)); | 2743 | struct timeval __user *tn = compat_alloc_user_space(sizeof(struct timeval)); |
2744 | struct timeval ts; | 2744 | struct timeval ts; |
2745 | if (get_user(ts.tv_sec, &tc->tv_sec) || | 2745 | if (get_user(ts.tv_sec, &tc->tv_sec) || |
2746 | get_user(ts.tv_usec, &tc->tv_usec) || | 2746 | get_user(ts.tv_usec, &tc->tv_usec) || |
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c index efc97d9b7860..d575452cd9f7 100644 --- a/fs/debugfs/file.c +++ b/fs/debugfs/file.c | |||
@@ -56,7 +56,7 @@ static u64 debugfs_u8_get(void *data) | |||
56 | DEFINE_SIMPLE_ATTRIBUTE(fops_u8, debugfs_u8_get, debugfs_u8_set, "%llu\n"); | 56 | DEFINE_SIMPLE_ATTRIBUTE(fops_u8, debugfs_u8_get, debugfs_u8_set, "%llu\n"); |
57 | 57 | ||
58 | /** | 58 | /** |
59 | * debugfs_create_u8 - create a file in the debugfs filesystem that is used to read and write a unsigned 8 bit value. | 59 | * debugfs_create_u8 - create a file in the debugfs filesystem that is used to read and write an unsigned 8 bit value. |
60 | * | 60 | * |
61 | * @name: a pointer to a string containing the name of the file to create. | 61 | * @name: a pointer to a string containing the name of the file to create. |
62 | * @mode: the permission that the file should have | 62 | * @mode: the permission that the file should have |
@@ -98,7 +98,7 @@ static u64 debugfs_u16_get(void *data) | |||
98 | DEFINE_SIMPLE_ATTRIBUTE(fops_u16, debugfs_u16_get, debugfs_u16_set, "%llu\n"); | 98 | DEFINE_SIMPLE_ATTRIBUTE(fops_u16, debugfs_u16_get, debugfs_u16_set, "%llu\n"); |
99 | 99 | ||
100 | /** | 100 | /** |
101 | * debugfs_create_u16 - create a file in the debugfs filesystem that is used to read and write a unsigned 8 bit value. | 101 | * debugfs_create_u16 - create a file in the debugfs filesystem that is used to read and write an unsigned 16 bit value. |
102 | * | 102 | * |
103 | * @name: a pointer to a string containing the name of the file to create. | 103 | * @name: a pointer to a string containing the name of the file to create. |
104 | * @mode: the permission that the file should have | 104 | * @mode: the permission that the file should have |
@@ -140,7 +140,7 @@ static u64 debugfs_u32_get(void *data) | |||
140 | DEFINE_SIMPLE_ATTRIBUTE(fops_u32, debugfs_u32_get, debugfs_u32_set, "%llu\n"); | 140 | DEFINE_SIMPLE_ATTRIBUTE(fops_u32, debugfs_u32_get, debugfs_u32_set, "%llu\n"); |
141 | 141 | ||
142 | /** | 142 | /** |
143 | * debugfs_create_u32 - create a file in the debugfs filesystem that is used to read and write a unsigned 8 bit value. | 143 | * debugfs_create_u32 - create a file in the debugfs filesystem that is used to read and write an unsigned 32 bit value. |
144 | * | 144 | * |
145 | * @name: a pointer to a string containing the name of the file to create. | 145 | * @name: a pointer to a string containing the name of the file to create. |
146 | * @mode: the permission that the file should have | 146 | * @mode: the permission that the file should have |
diff --git a/fs/inotify.c b/fs/inotify.c index 878ccca61213..3041503bde02 100644 --- a/fs/inotify.c +++ b/fs/inotify.c | |||
@@ -967,7 +967,7 @@ asmlinkage long sys_inotify_add_watch(int fd, const char __user *path, u32 mask) | |||
967 | mask_add = 1; | 967 | mask_add = 1; |
968 | 968 | ||
969 | /* don't let user-space set invalid bits: we don't want flags set */ | 969 | /* don't let user-space set invalid bits: we don't want flags set */ |
970 | mask &= IN_ALL_EVENTS; | 970 | mask &= IN_ALL_EVENTS | IN_ONESHOT; |
971 | if (unlikely(!mask)) { | 971 | if (unlikely(!mask)) { |
972 | ret = -EINVAL; | 972 | ret = -EINVAL; |
973 | goto out; | 973 | goto out; |
diff --git a/fs/namei.c b/fs/namei.c index faf61c35308c..e28de846c591 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1119,9 +1119,11 @@ static int fastcall do_path_lookup(int dfd, const char *name, | |||
1119 | current->total_link_count = 0; | 1119 | current->total_link_count = 0; |
1120 | retval = link_path_walk(name, nd); | 1120 | retval = link_path_walk(name, nd); |
1121 | out: | 1121 | out: |
1122 | if (unlikely(current->audit_context | 1122 | if (likely(retval == 0)) { |
1123 | && nd && nd->dentry && nd->dentry->d_inode)) | 1123 | if (unlikely(current->audit_context && nd && nd->dentry && |
1124 | nd->dentry->d_inode)) | ||
1124 | audit_inode(name, nd->dentry->d_inode, flags); | 1125 | audit_inode(name, nd->dentry->d_inode, flags); |
1126 | } | ||
1125 | return retval; | 1127 | return retval; |
1126 | 1128 | ||
1127 | fput_unlock_fail: | 1129 | fput_unlock_fail: |
diff --git a/fs/namespace.c b/fs/namespace.c index ce97becff461..058a44865beb 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -494,7 +494,7 @@ void umount_tree(struct vfsmount *mnt, int propagate, struct list_head *kill) | |||
494 | p->mnt_namespace = NULL; | 494 | p->mnt_namespace = NULL; |
495 | list_del_init(&p->mnt_child); | 495 | list_del_init(&p->mnt_child); |
496 | if (p->mnt_parent != p) | 496 | if (p->mnt_parent != p) |
497 | mnt->mnt_mountpoint->d_mounted--; | 497 | p->mnt_mountpoint->d_mounted--; |
498 | change_mnt_propagation(p, MS_PRIVATE); | 498 | change_mnt_propagation(p, MS_PRIVATE); |
499 | } | 499 | } |
500 | } | 500 | } |
@@ -1325,27 +1325,17 @@ dput_out: | |||
1325 | return retval; | 1325 | return retval; |
1326 | } | 1326 | } |
1327 | 1327 | ||
1328 | int copy_namespace(int flags, struct task_struct *tsk) | 1328 | /* |
1329 | * Allocate a new namespace structure and populate it with contents | ||
1330 | * copied from the namespace of the passed in task structure. | ||
1331 | */ | ||
1332 | struct namespace *dup_namespace(struct task_struct *tsk, struct fs_struct *fs) | ||
1329 | { | 1333 | { |
1330 | struct namespace *namespace = tsk->namespace; | 1334 | struct namespace *namespace = tsk->namespace; |
1331 | struct namespace *new_ns; | 1335 | struct namespace *new_ns; |
1332 | struct vfsmount *rootmnt = NULL, *pwdmnt = NULL, *altrootmnt = NULL; | 1336 | struct vfsmount *rootmnt = NULL, *pwdmnt = NULL, *altrootmnt = NULL; |
1333 | struct fs_struct *fs = tsk->fs; | ||
1334 | struct vfsmount *p, *q; | 1337 | struct vfsmount *p, *q; |
1335 | 1338 | ||
1336 | if (!namespace) | ||
1337 | return 0; | ||
1338 | |||
1339 | get_namespace(namespace); | ||
1340 | |||
1341 | if (!(flags & CLONE_NEWNS)) | ||
1342 | return 0; | ||
1343 | |||
1344 | if (!capable(CAP_SYS_ADMIN)) { | ||
1345 | put_namespace(namespace); | ||
1346 | return -EPERM; | ||
1347 | } | ||
1348 | |||
1349 | new_ns = kmalloc(sizeof(struct namespace), GFP_KERNEL); | 1339 | new_ns = kmalloc(sizeof(struct namespace), GFP_KERNEL); |
1350 | if (!new_ns) | 1340 | if (!new_ns) |
1351 | goto out; | 1341 | goto out; |
@@ -1396,8 +1386,6 @@ int copy_namespace(int flags, struct task_struct *tsk) | |||
1396 | } | 1386 | } |
1397 | up_write(&namespace_sem); | 1387 | up_write(&namespace_sem); |
1398 | 1388 | ||
1399 | tsk->namespace = new_ns; | ||
1400 | |||
1401 | if (rootmnt) | 1389 | if (rootmnt) |
1402 | mntput(rootmnt); | 1390 | mntput(rootmnt); |
1403 | if (pwdmnt) | 1391 | if (pwdmnt) |
@@ -1405,12 +1393,40 @@ int copy_namespace(int flags, struct task_struct *tsk) | |||
1405 | if (altrootmnt) | 1393 | if (altrootmnt) |
1406 | mntput(altrootmnt); | 1394 | mntput(altrootmnt); |
1407 | 1395 | ||
1408 | put_namespace(namespace); | 1396 | out: |
1409 | return 0; | 1397 | return new_ns; |
1398 | } | ||
1399 | |||
1400 | int copy_namespace(int flags, struct task_struct *tsk) | ||
1401 | { | ||
1402 | struct namespace *namespace = tsk->namespace; | ||
1403 | struct namespace *new_ns; | ||
1404 | int err = 0; | ||
1405 | |||
1406 | if (!namespace) | ||
1407 | return 0; | ||
1408 | |||
1409 | get_namespace(namespace); | ||
1410 | |||
1411 | if (!(flags & CLONE_NEWNS)) | ||
1412 | return 0; | ||
1413 | |||
1414 | if (!capable(CAP_SYS_ADMIN)) { | ||
1415 | err = -EPERM; | ||
1416 | goto out; | ||
1417 | } | ||
1418 | |||
1419 | new_ns = dup_namespace(tsk, tsk->fs); | ||
1420 | if (!new_ns) { | ||
1421 | err = -ENOMEM; | ||
1422 | goto out; | ||
1423 | } | ||
1424 | |||
1425 | tsk->namespace = new_ns; | ||
1410 | 1426 | ||
1411 | out: | 1427 | out: |
1412 | put_namespace(namespace); | 1428 | put_namespace(namespace); |
1413 | return -ENOMEM; | 1429 | return err; |
1414 | } | 1430 | } |
1415 | 1431 | ||
1416 | asmlinkage long sys_mount(char __user * dev_name, char __user * dir_name, | 1432 | asmlinkage long sys_mount(char __user * dev_name, char __user * dir_name, |
diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c index e897e00c2c9d..c0a754ecdee6 100644 --- a/fs/nfs/nfsroot.c +++ b/fs/nfs/nfsroot.c | |||
@@ -465,10 +465,11 @@ static int __init root_nfs_ports(void) | |||
465 | "number from server, using default\n"); | 465 | "number from server, using default\n"); |
466 | port = nfsd_port; | 466 | port = nfsd_port; |
467 | } | 467 | } |
468 | nfs_port = htons(port); | 468 | nfs_port = port; |
469 | dprintk("Root-NFS: Portmapper on server returned %d " | 469 | dprintk("Root-NFS: Portmapper on server returned %d " |
470 | "as nfsd port\n", port); | 470 | "as nfsd port\n", port); |
471 | } | 471 | } |
472 | nfs_port = htons(nfs_port); | ||
472 | 473 | ||
473 | if ((port = root_nfs_getport(NFS_MNT_PROGRAM, mountd_ver, proto)) < 0) { | 474 | if ((port = root_nfs_getport(NFS_MNT_PROGRAM, mountd_ver, proto)) < 0) { |
474 | printk(KERN_ERR "Root-NFS: Unable to get mountd port " | 475 | printk(KERN_ERR "Root-NFS: Unable to get mountd port " |
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index a00fe8686293..6d63f1d9e5f5 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c | |||
@@ -195,10 +195,12 @@ nfsd4_open(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open | |||
195 | 195 | ||
196 | /* Openowner is now set, so sequence id will get bumped. Now we need | 196 | /* Openowner is now set, so sequence id will get bumped. Now we need |
197 | * these checks before we do any creates: */ | 197 | * these checks before we do any creates: */ |
198 | status = nfserr_grace; | ||
198 | if (nfs4_in_grace() && open->op_claim_type != NFS4_OPEN_CLAIM_PREVIOUS) | 199 | if (nfs4_in_grace() && open->op_claim_type != NFS4_OPEN_CLAIM_PREVIOUS) |
199 | return nfserr_grace; | 200 | goto out; |
201 | status = nfserr_no_grace; | ||
200 | if (!nfs4_in_grace() && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS) | 202 | if (!nfs4_in_grace() && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS) |
201 | return nfserr_no_grace; | 203 | goto out; |
202 | 204 | ||
203 | switch (open->op_claim_type) { | 205 | switch (open->op_claim_type) { |
204 | case NFS4_OPEN_CLAIM_DELEGATE_CUR: | 206 | case NFS4_OPEN_CLAIM_DELEGATE_CUR: |
diff --git a/fs/reiserfs/hashes.c b/fs/reiserfs/hashes.c index a3ec238fd9e0..e664ac16fad9 100644 --- a/fs/reiserfs/hashes.c +++ b/fs/reiserfs/hashes.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/reiserfs_fs.h> | 22 | #include <linux/reiserfs_fs.h> |
23 | #include <asm/types.h> | 23 | #include <asm/types.h> |
24 | #include <asm/bug.h> | ||
25 | 24 | ||
26 | #define DELTA 0x9E3779B9 | 25 | #define DELTA 0x9E3779B9 |
27 | #define FULLROUNDS 10 /* 32 is overkill, 16 is strong crypto */ | 26 | #define FULLROUNDS 10 /* 32 is overkill, 16 is strong crypto */ |
diff --git a/fs/select.c b/fs/select.c index c0f02d36c60e..bc60a3e14ef3 100644 --- a/fs/select.c +++ b/fs/select.c | |||
@@ -510,9 +510,9 @@ asmlinkage long sys_pselect6(int n, fd_set __user *inp, fd_set __user *outp, | |||
510 | 510 | ||
511 | if (sig) { | 511 | if (sig) { |
512 | if (!access_ok(VERIFY_READ, sig, sizeof(void *)+sizeof(size_t)) | 512 | if (!access_ok(VERIFY_READ, sig, sizeof(void *)+sizeof(size_t)) |
513 | || __get_user(up, (sigset_t * __user *)sig) | 513 | || __get_user(up, (sigset_t __user * __user *)sig) |
514 | || __get_user(sigsetsize, | 514 | || __get_user(sigsetsize, |
515 | (size_t * __user)(sig+sizeof(void *)))) | 515 | (size_t __user *)(sig+sizeof(void *)))) |
516 | return -EFAULT; | 516 | return -EFAULT; |
517 | } | 517 | } |
518 | 518 | ||
diff --git a/fs/super.c b/fs/super.c index c177b92419c5..30294218fa63 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -247,8 +247,9 @@ void generic_shutdown_super(struct super_block *sb) | |||
247 | 247 | ||
248 | /* Forget any remaining inodes */ | 248 | /* Forget any remaining inodes */ |
249 | if (invalidate_inodes(sb)) { | 249 | if (invalidate_inodes(sb)) { |
250 | printk("VFS: Busy inodes after unmount. " | 250 | printk("VFS: Busy inodes after unmount of %s. " |
251 | "Self-destruct in 5 seconds. Have a nice day...\n"); | 251 | "Self-destruct in 5 seconds. Have a nice day...\n", |
252 | sb->s_id); | ||
252 | } | 253 | } |
253 | 254 | ||
254 | unlock_kernel(); | 255 | unlock_kernel(); |
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 9892268e3005..8f2beec526cf 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
@@ -747,10 +747,11 @@ xfs_convert_page( | |||
747 | struct backing_dev_info *bdi; | 747 | struct backing_dev_info *bdi; |
748 | 748 | ||
749 | bdi = inode->i_mapping->backing_dev_info; | 749 | bdi = inode->i_mapping->backing_dev_info; |
750 | wbc->nr_to_write--; | ||
750 | if (bdi_write_congested(bdi)) { | 751 | if (bdi_write_congested(bdi)) { |
751 | wbc->encountered_congestion = 1; | 752 | wbc->encountered_congestion = 1; |
752 | done = 1; | 753 | done = 1; |
753 | } else if (--wbc->nr_to_write <= 0) { | 754 | } else if (wbc->nr_to_write <= 0) { |
754 | done = 1; | 755 | done = 1; |
755 | } | 756 | } |
756 | } | 757 | } |
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index eda7919b70a1..d7f6f2d8ac8e 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c | |||
@@ -673,6 +673,8 @@ linvfs_setattr( | |||
673 | if (ia_valid & ATTR_ATIME) { | 673 | if (ia_valid & ATTR_ATIME) { |
674 | vattr.va_mask |= XFS_AT_ATIME; | 674 | vattr.va_mask |= XFS_AT_ATIME; |
675 | vattr.va_atime = attr->ia_atime; | 675 | vattr.va_atime = attr->ia_atime; |
676 | if (ia_valid & ATTR_ATIME_SET) | ||
677 | inode->i_atime = attr->ia_atime; | ||
676 | } | 678 | } |
677 | if (ia_valid & ATTR_MTIME) { | 679 | if (ia_valid & ATTR_MTIME) { |
678 | vattr.va_mask |= XFS_AT_MTIME; | 680 | vattr.va_mask |= XFS_AT_MTIME; |