aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/Kconfig2
-rw-r--r--fs/aio.c21
-rw-r--r--fs/befs/linuxvfs.c2
-rw-r--r--fs/block_dev.c4
-rw-r--r--fs/compat.c2
-rw-r--r--fs/compat_ioctl.c11
-rw-r--r--fs/ecryptfs/crypto.c2
-rw-r--r--fs/ext4/extents.c2
-rw-r--r--fs/ext4/mballoc.c2
-rw-r--r--fs/ext4/super.c2
-rw-r--r--fs/freevxfs/vxfs_super.c2
-rw-r--r--fs/fuse/dir.c2
-rw-r--r--fs/namei.c6
-rw-r--r--fs/ncpfs/inode.c4
-rw-r--r--fs/nfs/dir.c2
-rw-r--r--fs/ocfs2/dlm/dlmdebug.c6
-rw-r--r--fs/ocfs2/dlmfs/dlmfs.c3
-rw-r--r--fs/ocfs2/dlmglue.c4
-rw-r--r--fs/ocfs2/super.c2
-rw-r--r--fs/open.c11
-rw-r--r--fs/reiserfs/inode.c2
21 files changed, 48 insertions, 46 deletions
diff --git a/fs/Kconfig b/fs/Kconfig
index 5f85b594761..3d185308ec8 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -64,7 +64,7 @@ source "fs/autofs4/Kconfig"
64source "fs/fuse/Kconfig" 64source "fs/fuse/Kconfig"
65 65
66config CUSE 66config CUSE
67 tristate "Character device in Userpace support" 67 tristate "Character device in Userspace support"
68 depends on FUSE_FS 68 depends on FUSE_FS
69 help 69 help
70 This FUSE extension allows character devices to be 70 This FUSE extension allows character devices to be
diff --git a/fs/aio.c b/fs/aio.c
index 1ccf25cef1f..3006b5bc33d 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1277,7 +1277,7 @@ out:
1277/* sys_io_destroy: 1277/* sys_io_destroy:
1278 * Destroy the aio_context specified. May cancel any outstanding 1278 * Destroy the aio_context specified. May cancel any outstanding
1279 * AIOs and block on completion. Will fail with -ENOSYS if not 1279 * AIOs and block on completion. Will fail with -ENOSYS if not
1280 * implemented. May fail with -EFAULT if the context pointed to 1280 * implemented. May fail with -EINVAL if the context pointed to
1281 * is invalid. 1281 * is invalid.
1282 */ 1282 */
1283SYSCALL_DEFINE1(io_destroy, aio_context_t, ctx) 1283SYSCALL_DEFINE1(io_destroy, aio_context_t, ctx)
@@ -1795,15 +1795,16 @@ SYSCALL_DEFINE3(io_cancel, aio_context_t, ctx_id, struct iocb __user *, iocb,
1795 1795
1796/* io_getevents: 1796/* io_getevents:
1797 * Attempts to read at least min_nr events and up to nr events from 1797 * Attempts to read at least min_nr events and up to nr events from
1798 * the completion queue for the aio_context specified by ctx_id. May 1798 * the completion queue for the aio_context specified by ctx_id. If
1799 * fail with -EINVAL if ctx_id is invalid, if min_nr is out of range, 1799 * it succeeds, the number of read events is returned. May fail with
1800 * if nr is out of range, if when is out of range. May fail with 1800 * -EINVAL if ctx_id is invalid, if min_nr is out of range, if nr is
1801 * -EFAULT if any of the memory specified to is invalid. May return 1801 * out of range, if timeout is out of range. May fail with -EFAULT
1802 * 0 or < min_nr if no events are available and the timeout specified 1802 * if any of the memory specified is invalid. May return 0 or
1803 * by when has elapsed, where when == NULL specifies an infinite 1803 * < min_nr if the timeout specified by timeout has elapsed
1804 * timeout. Note that the timeout pointed to by when is relative and 1804 * before sufficient events are available, where timeout == NULL
1805 * will be updated if not NULL and the operation blocks. Will fail 1805 * specifies an infinite timeout. Note that the timeout pointed to by
1806 * with -ENOSYS if not implemented. 1806 * timeout is relative and will be updated if not NULL and the
1807 * operation blocks. Will fail with -ENOSYS if not implemented.
1807 */ 1808 */
1808SYSCALL_DEFINE5(io_getevents, aio_context_t, ctx_id, 1809SYSCALL_DEFINE5(io_getevents, aio_context_t, ctx_id,
1809 long, min_nr, 1810 long, min_nr,
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 34ddda888e6..dc39d282488 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -436,7 +436,7 @@ befs_init_inodecache(void)
436 init_once); 436 init_once);
437 if (befs_inode_cachep == NULL) { 437 if (befs_inode_cachep == NULL) {
438 printk(KERN_ERR "befs_init_inodecache: " 438 printk(KERN_ERR "befs_init_inodecache: "
439 "Couldn't initalize inode slabcache\n"); 439 "Couldn't initialize inode slabcache\n");
440 return -ENOMEM; 440 return -ENOMEM;
441 } 441 }
442 442
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 99d6af81174..b3171fb0dc9 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -681,8 +681,8 @@ retry:
681 if (!bd_may_claim(bdev, whole, holder)) 681 if (!bd_may_claim(bdev, whole, holder))
682 return -EBUSY; 682 return -EBUSY;
683 683
684 /* if someone else is claiming, wait for it to finish */ 684 /* if claiming is already in progress, wait for it to finish */
685 if (whole->bd_claiming && whole->bd_claiming != holder) { 685 if (whole->bd_claiming) {
686 wait_queue_head_t *wq = bit_waitqueue(&whole->bd_claiming, 0); 686 wait_queue_head_t *wq = bit_waitqueue(&whole->bd_claiming, 0);
687 DEFINE_WAIT(wait); 687 DEFINE_WAIT(wait);
688 688
diff --git a/fs/compat.c b/fs/compat.c
index 6490d2134ff..c6fda9aeb86 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -8,7 +8,7 @@
8 * Copyright (C) 1997-2000 Jakub Jelinek (jakub@redhat.com) 8 * Copyright (C) 1997-2000 Jakub Jelinek (jakub@redhat.com)
9 * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) 9 * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be)
10 * Copyright (C) 2001,2002 Andi Kleen, SuSE Labs 10 * Copyright (C) 2001,2002 Andi Kleen, SuSE Labs
11 * Copyright (C) 2003 Pavel Machek (pavel@suse.cz) 11 * Copyright (C) 2003 Pavel Machek (pavel@ucw.cz)
12 * 12 *
13 * This program is free software; you can redistribute it and/or modify 13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2 as 14 * it under the terms of the GNU General Public License version 2 as
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index 641640dc7ae..63ae8583146 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -4,7 +4,7 @@
4 * Copyright (C) 1997-2000 Jakub Jelinek (jakub@redhat.com) 4 * Copyright (C) 1997-2000 Jakub Jelinek (jakub@redhat.com)
5 * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) 5 * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be)
6 * Copyright (C) 2001,2002 Andi Kleen, SuSE Labs 6 * Copyright (C) 2001,2002 Andi Kleen, SuSE Labs
7 * Copyright (C) 2003 Pavel Machek (pavel@suse.cz) 7 * Copyright (C) 2003 Pavel Machek (pavel@ucw.cz)
8 * 8 *
9 * These routines maintain argument size conversion between 32bit and 64bit 9 * These routines maintain argument size conversion between 32bit and 64bit
10 * ioctls. 10 * ioctls.
@@ -601,8 +601,11 @@ static int ioc_settimeout(unsigned int fd, unsigned int cmd,
601} 601}
602 602
603/* Bluetooth ioctls */ 603/* Bluetooth ioctls */
604#define HCIUARTSETPROTO _IOW('U', 200, int) 604#define HCIUARTSETPROTO _IOW('U', 200, int)
605#define HCIUARTGETPROTO _IOR('U', 201, int) 605#define HCIUARTGETPROTO _IOR('U', 201, int)
606#define HCIUARTGETDEVICE _IOR('U', 202, int)
607#define HCIUARTSETFLAGS _IOW('U', 203, int)
608#define HCIUARTGETFLAGS _IOR('U', 204, int)
606 609
607#define BNEPCONNADD _IOW('B', 200, int) 610#define BNEPCONNADD _IOW('B', 200, int)
608#define BNEPCONNDEL _IOW('B', 201, int) 611#define BNEPCONNDEL _IOW('B', 201, int)
@@ -1328,6 +1331,8 @@ COMPATIBLE_IOCTL(HCISETLINKPOL)
1328COMPATIBLE_IOCTL(HCISETLINKMODE) 1331COMPATIBLE_IOCTL(HCISETLINKMODE)
1329COMPATIBLE_IOCTL(HCISETACLMTU) 1332COMPATIBLE_IOCTL(HCISETACLMTU)
1330COMPATIBLE_IOCTL(HCISETSCOMTU) 1333COMPATIBLE_IOCTL(HCISETSCOMTU)
1334COMPATIBLE_IOCTL(HCIBLOCKADDR)
1335COMPATIBLE_IOCTL(HCIUNBLOCKADDR)
1331COMPATIBLE_IOCTL(HCIINQUIRY) 1336COMPATIBLE_IOCTL(HCIINQUIRY)
1332COMPATIBLE_IOCTL(HCIUARTSETPROTO) 1337COMPATIBLE_IOCTL(HCIUARTSETPROTO)
1333COMPATIBLE_IOCTL(HCIUARTGETPROTO) 1338COMPATIBLE_IOCTL(HCIUARTGETPROTO)
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
index 1cc087635a5..a2e3b562e65 100644
--- a/fs/ecryptfs/crypto.c
+++ b/fs/ecryptfs/crypto.c
@@ -762,7 +762,7 @@ ecryptfs_decrypt_page_offset(struct ecryptfs_crypt_stat *crypt_stat,
762 762
763/** 763/**
764 * ecryptfs_init_crypt_ctx 764 * ecryptfs_init_crypt_ctx
765 * @crypt_stat: Uninitilized crypt stats structure 765 * @crypt_stat: Uninitialized crypt stats structure
766 * 766 *
767 * Initialize the crypto context. 767 * Initialize the crypto context.
768 * 768 *
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 377309c1af6..bf029c7d551 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -2937,7 +2937,7 @@ fix_extent_len:
2937 * One of more index blocks maybe needed if the extent tree grow after 2937 * One of more index blocks maybe needed if the extent tree grow after
2938 * the unintialized extent split. To prevent ENOSPC occur at the IO 2938 * the unintialized extent split. To prevent ENOSPC occur at the IO
2939 * complete, we need to split the uninitialized extent before DIO submit 2939 * complete, we need to split the uninitialized extent before DIO submit
2940 * the IO. The uninitilized extent called at this time will be split 2940 * the IO. The uninitialized extent called at this time will be split
2941 * into three uninitialized extent(at most). After IO complete, the part 2941 * into three uninitialized extent(at most). After IO complete, the part
2942 * being filled will be convert to initialized by the end_io callback function 2942 * being filled will be convert to initialized by the end_io callback function
2943 * via ext4_convert_unwritten_extents(). 2943 * via ext4_convert_unwritten_extents().
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 12b3bc026a6..0e83dfd351d 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2704,7 +2704,7 @@ void exit_ext4_mballoc(void)
2704 2704
2705 2705
2706/* 2706/*
2707 * Check quota and mark choosed space (ac->ac_b_ex) non-free in bitmaps 2707 * Check quota and mark chosen space (ac->ac_b_ex) non-free in bitmaps
2708 * Returns 0 if success or error code 2708 * Returns 0 if success or error code
2709 */ 2709 */
2710static noinline_for_stack int 2710static noinline_for_stack int
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 4e8983a9811..e72d3235b2f 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3010,7 +3010,7 @@ no_journal:
3010 ext4_ext_init(sb); 3010 ext4_ext_init(sb);
3011 err = ext4_mb_init(sb, needs_recovery); 3011 err = ext4_mb_init(sb, needs_recovery);
3012 if (err) { 3012 if (err) {
3013 ext4_msg(sb, KERN_ERR, "failed to initalize mballoc (%d)", 3013 ext4_msg(sb, KERN_ERR, "failed to initialize mballoc (%d)",
3014 err); 3014 err);
3015 goto failed_mount4; 3015 goto failed_mount4;
3016 } 3016 }
diff --git a/fs/freevxfs/vxfs_super.c b/fs/freevxfs/vxfs_super.c
index 1e8af939b3e..5132c99b1ca 100644
--- a/fs/freevxfs/vxfs_super.c
+++ b/fs/freevxfs/vxfs_super.c
@@ -135,7 +135,7 @@ static int vxfs_remount(struct super_block *sb, int *flags, char *data)
135} 135}
136 136
137/** 137/**
138 * vxfs_read_super - read superblock into memory and initalize filesystem 138 * vxfs_read_super - read superblock into memory and initialize filesystem
139 * @sbp: VFS superblock (to fill) 139 * @sbp: VFS superblock (to fill)
140 * @dp: fs private mount data 140 * @dp: fs private mount data
141 * @silent: do not complain loudly when sth is wrong 141 * @silent: do not complain loudly when sth is wrong
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 3cdc5f78a40..431be0795b6 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1016,7 +1016,7 @@ static int fuse_permission(struct inode *inode, int mask)
1016 exist. So if permissions are revoked this won't be 1016 exist. So if permissions are revoked this won't be
1017 noticed immediately, only after the attribute 1017 noticed immediately, only after the attribute
1018 timeout has expired */ 1018 timeout has expired */
1019 } else if (mask & MAY_ACCESS) { 1019 } else if (mask & (MAY_ACCESS | MAY_CHDIR)) {
1020 err = fuse_access(inode, mask); 1020 err = fuse_access(inode, mask);
1021 } else if ((mask & MAY_EXEC) && S_ISREG(inode->i_mode)) { 1021 } else if ((mask & MAY_EXEC) && S_ISREG(inode->i_mode)) {
1022 if (!(inode->i_mode & S_IXUGO)) { 1022 if (!(inode->i_mode & S_IXUGO)) {
diff --git a/fs/namei.c b/fs/namei.c
index 868d0cb9d47..42d2d28fb82 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -282,8 +282,7 @@ int inode_permission(struct inode *inode, int mask)
282 if (retval) 282 if (retval)
283 return retval; 283 return retval;
284 284
285 return security_inode_permission(inode, 285 return security_inode_permission(inode, mask);
286 mask & (MAY_READ|MAY_WRITE|MAY_EXEC|MAY_APPEND));
287} 286}
288 287
289/** 288/**
@@ -1484,8 +1483,7 @@ static int handle_truncate(struct path *path)
1484 */ 1483 */
1485 error = locks_verify_locked(inode); 1484 error = locks_verify_locked(inode);
1486 if (!error) 1485 if (!error)
1487 error = security_path_truncate(path, 0, 1486 error = security_path_truncate(path);
1488 ATTR_MTIME|ATTR_CTIME|ATTR_OPEN);
1489 if (!error) { 1487 if (!error) {
1490 error = do_truncate(path->dentry, 0, 1488 error = do_truncate(path->dentry, 0,
1491 ATTR_MTIME|ATTR_CTIME|ATTR_OPEN, 1489 ATTR_MTIME|ATTR_CTIME|ATTR_OPEN,
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c
index fa338515402..1e634deff94 100644
--- a/fs/ncpfs/inode.c
+++ b/fs/ncpfs/inode.c
@@ -728,8 +728,8 @@ out_fput:
728out_bdi: 728out_bdi:
729 /* 23/12/1998 Marcin Dalecki <dalecki@cs.net.pl>: 729 /* 23/12/1998 Marcin Dalecki <dalecki@cs.net.pl>:
730 * 730 *
731 * The previously used put_filp(ncp_filp); was bogous, since 731 * The previously used put_filp(ncp_filp); was bogus, since
732 * it doesn't proper unlocking. 732 * it doesn't perform proper unlocking.
733 */ 733 */
734 fput(ncp_filp); 734 fput(ncp_filp);
735out: 735out:
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index e60416d3f81..832e9e23932 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1953,7 +1953,7 @@ int nfs_permission(struct inode *inode, int mask)
1953 if ((mask & (MAY_READ | MAY_WRITE | MAY_EXEC)) == 0) 1953 if ((mask & (MAY_READ | MAY_WRITE | MAY_EXEC)) == 0)
1954 goto out; 1954 goto out;
1955 /* Is this sys_access() ? */ 1955 /* Is this sys_access() ? */
1956 if (mask & MAY_ACCESS) 1956 if (mask & (MAY_ACCESS | MAY_CHDIR))
1957 goto force_lookup; 1957 goto force_lookup;
1958 1958
1959 switch (inode->i_mode & S_IFMT) { 1959 switch (inode->i_mode & S_IFMT) {
diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c
index 0cd24cf5439..5efdd37dfe4 100644
--- a/fs/ocfs2/dlm/dlmdebug.c
+++ b/fs/ocfs2/dlm/dlmdebug.c
@@ -419,7 +419,7 @@ static loff_t debug_buffer_llseek(struct file *file, loff_t off, int whence)
419 419
420static int debug_buffer_release(struct inode *inode, struct file *file) 420static int debug_buffer_release(struct inode *inode, struct file *file)
421{ 421{
422 struct debug_buffer *db = (struct debug_buffer *)file->private_data; 422 struct debug_buffer *db = file->private_data;
423 423
424 if (db) 424 if (db)
425 kfree(db->buf); 425 kfree(db->buf);
@@ -715,7 +715,7 @@ static int debug_lockres_open(struct inode *inode, struct file *file)
715 goto bail; 715 goto bail;
716 } 716 }
717 717
718 seq = (struct seq_file *) file->private_data; 718 seq = file->private_data;
719 seq->private = dl; 719 seq->private = dl;
720 720
721 dlm_grab(dlm); 721 dlm_grab(dlm);
@@ -731,7 +731,7 @@ bail:
731 731
732static int debug_lockres_release(struct inode *inode, struct file *file) 732static int debug_lockres_release(struct inode *inode, struct file *file)
733{ 733{
734 struct seq_file *seq = (struct seq_file *)file->private_data; 734 struct seq_file *seq = file->private_data;
735 struct debug_lockres *dl = (struct debug_lockres *)seq->private; 735 struct debug_lockres *dl = (struct debug_lockres *)seq->private;
736 736
737 if (dl->dl_res) 737 if (dl->dl_res)
diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c
index b83d6107a1f..bef34d0528d 100644
--- a/fs/ocfs2/dlmfs/dlmfs.c
+++ b/fs/ocfs2/dlmfs/dlmfs.c
@@ -182,8 +182,7 @@ static int dlmfs_file_release(struct inode *inode,
182{ 182{
183 int level, status; 183 int level, status;
184 struct dlmfs_inode_private *ip = DLMFS_I(inode); 184 struct dlmfs_inode_private *ip = DLMFS_I(inode);
185 struct dlmfs_filp_private *fp = 185 struct dlmfs_filp_private *fp = file->private_data;
186 (struct dlmfs_filp_private *) file->private_data;
187 186
188 if (S_ISDIR(inode->i_mode)) 187 if (S_ISDIR(inode->i_mode))
189 BUG(); 188 BUG();
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index 39eb16ac5f9..5e02a893f46 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -2966,7 +2966,7 @@ static const struct seq_operations ocfs2_dlm_seq_ops = {
2966 2966
2967static int ocfs2_dlm_debug_release(struct inode *inode, struct file *file) 2967static int ocfs2_dlm_debug_release(struct inode *inode, struct file *file)
2968{ 2968{
2969 struct seq_file *seq = (struct seq_file *) file->private_data; 2969 struct seq_file *seq = file->private_data;
2970 struct ocfs2_dlm_seq_priv *priv = seq->private; 2970 struct ocfs2_dlm_seq_priv *priv = seq->private;
2971 struct ocfs2_lock_res *res = &priv->p_iter_res; 2971 struct ocfs2_lock_res *res = &priv->p_iter_res;
2972 2972
@@ -3000,7 +3000,7 @@ static int ocfs2_dlm_debug_open(struct inode *inode, struct file *file)
3000 goto out; 3000 goto out;
3001 } 3001 }
3002 3002
3003 seq = (struct seq_file *) file->private_data; 3003 seq = file->private_data;
3004 seq->private = priv; 3004 seq->private = priv;
3005 3005
3006 ocfs2_add_lockres_tracking(&priv->p_iter_res, 3006 ocfs2_add_lockres_tracking(&priv->p_iter_res,
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 0eaa929a4db..03a799fdd74 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -2472,7 +2472,7 @@ static void ocfs2_delete_osb(struct ocfs2_super *osb)
2472 kfree(osb->slot_recovery_generations); 2472 kfree(osb->slot_recovery_generations);
2473 /* FIXME 2473 /* FIXME
2474 * This belongs in journal shutdown, but because we have to 2474 * This belongs in journal shutdown, but because we have to
2475 * allocate osb->journal at the start of ocfs2_initalize_osb(), 2475 * allocate osb->journal at the start of ocfs2_initialize_osb(),
2476 * we free it here. 2476 * we free it here.
2477 */ 2477 */
2478 kfree(osb->journal); 2478 kfree(osb->journal);
diff --git a/fs/open.c b/fs/open.c
index 5463266db9e..0d1fa3dc0ef 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -110,7 +110,7 @@ static long do_sys_truncate(const char __user *pathname, loff_t length)
110 110
111 error = locks_verify_truncate(inode, NULL, length); 111 error = locks_verify_truncate(inode, NULL, length);
112 if (!error) 112 if (!error)
113 error = security_path_truncate(&path, length, 0); 113 error = security_path_truncate(&path);
114 if (!error) 114 if (!error)
115 error = do_truncate(path.dentry, length, 0, NULL); 115 error = do_truncate(path.dentry, length, 0, NULL);
116 116
@@ -165,8 +165,7 @@ static long do_sys_ftruncate(unsigned int fd, loff_t length, int small)
165 165
166 error = locks_verify_truncate(inode, file, length); 166 error = locks_verify_truncate(inode, file, length);
167 if (!error) 167 if (!error)
168 error = security_path_truncate(&file->f_path, length, 168 error = security_path_truncate(&file->f_path);
169 ATTR_MTIME|ATTR_CTIME);
170 if (!error) 169 if (!error)
171 error = do_truncate(dentry, length, ATTR_MTIME|ATTR_CTIME, file); 170 error = do_truncate(dentry, length, ATTR_MTIME|ATTR_CTIME, file);
172out_putf: 171out_putf:
@@ -367,7 +366,7 @@ SYSCALL_DEFINE1(chdir, const char __user *, filename)
367 if (error) 366 if (error)
368 goto out; 367 goto out;
369 368
370 error = inode_permission(path.dentry->d_inode, MAY_EXEC | MAY_ACCESS); 369 error = inode_permission(path.dentry->d_inode, MAY_EXEC | MAY_CHDIR);
371 if (error) 370 if (error)
372 goto dput_and_out; 371 goto dput_and_out;
373 372
@@ -396,7 +395,7 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd)
396 if (!S_ISDIR(inode->i_mode)) 395 if (!S_ISDIR(inode->i_mode))
397 goto out_putf; 396 goto out_putf;
398 397
399 error = inode_permission(inode, MAY_EXEC | MAY_ACCESS); 398 error = inode_permission(inode, MAY_EXEC | MAY_CHDIR);
400 if (!error) 399 if (!error)
401 set_fs_pwd(current->fs, &file->f_path); 400 set_fs_pwd(current->fs, &file->f_path);
402out_putf: 401out_putf:
@@ -414,7 +413,7 @@ SYSCALL_DEFINE1(chroot, const char __user *, filename)
414 if (error) 413 if (error)
415 goto out; 414 goto out;
416 415
417 error = inode_permission(path.dentry->d_inode, MAY_EXEC | MAY_ACCESS); 416 error = inode_permission(path.dentry->d_inode, MAY_EXEC | MAY_CHDIR);
418 if (error) 417 if (error)
419 goto dput_and_out; 418 goto dput_and_out;
420 419
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index 0f22fdaf54a..29db72203bd 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -1221,7 +1221,7 @@ static void init_inode(struct inode *inode, struct treepath *path)
1221 inode_set_bytes(inode, 1221 inode_set_bytes(inode,
1222 to_real_used_space(inode, inode->i_blocks, 1222 to_real_used_space(inode, inode->i_blocks,
1223 SD_V2_SIZE)); 1223 SD_V2_SIZE));
1224 /* read persistent inode attributes from sd and initalise 1224 /* read persistent inode attributes from sd and initialise
1225 generic inode flags from them */ 1225 generic inode flags from them */
1226 REISERFS_I(inode)->i_attrs = sd_v2_attrs(sd); 1226 REISERFS_I(inode)->i_attrs = sd_v2_attrs(sd);
1227 sd_attrs_to_i_attrs(sd_v2_attrs(sd), inode); 1227 sd_attrs_to_i_attrs(sd_v2_attrs(sd), inode);