aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-11 21:52:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-11 21:52:03 -0400
commit79360ddd73dfe9a26f49ef4e27b8c26612929b0e (patch)
treea8b0d226e0d83ea4e3a8c27b091a7121dbb9638b /include/linux
parent8213a2f3eeafdecf06dd718cb4130372263f6067 (diff)
parent98f6ef64b15a48f15062aff5d143b5d9a6ae7711 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull pile 2 of vfs updates from Al Viro: "Stuff in this one - assorted fixes, lglock tidy-up, death to lock_super(). There'll be a VFS pile tomorrow (with patches from Jeff Layton, sanitizing getname() and related parts of audit and preparing for ESTALE fixes), but I'd rather push the stuff in this one ASAP - some of the bugs closed here are quite unpleasant." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: vfs: bogus warnings in fs/namei.c consitify do_mount() arguments lglock: add DEFINE_STATIC_LGLOCK() lglock: make the per_cpu locks static lglock: remove unused DEFINE_LGLOCK_LOCKDEP() MAX_LFS_FILESIZE definition for 64bit needs LL... tmpfs,ceph,gfs2,isofs,reiserfs,xfs: fix fh_len checking vfs: drop lock/unlock super ufs: drop lock/unlock super sysv: drop lock/unlock super hpfs: drop lock/unlock super fat: drop lock/unlock super ext3: drop lock/unlock super exofs: drop lock/unlock super dup3: Return an error when oldfd == newfd. fs: handle failed audit_log_start properly fs: prevent use after free in auditing when symlink following was denied
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h5
-rw-r--r--include/linux/lglock.h19
-rw-r--r--include/linux/security.h12
3 files changed, 16 insertions, 20 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 39f3e12ca752..8ef2fc9f1f08 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1136,7 +1136,7 @@ static inline int file_check_writeable(struct file *filp)
1136#if BITS_PER_LONG==32 1136#if BITS_PER_LONG==32
1137#define MAX_LFS_FILESIZE (((loff_t)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) 1137#define MAX_LFS_FILESIZE (((loff_t)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1)
1138#elif BITS_PER_LONG==64 1138#elif BITS_PER_LONG==64
1139#define MAX_LFS_FILESIZE ((loff_t)0x7fffffffffffffff) 1139#define MAX_LFS_FILESIZE ((loff_t)0x7fffffffffffffffLL)
1140#endif 1140#endif
1141 1141
1142#define FL_POSIX 1 1142#define FL_POSIX 1
@@ -1511,7 +1511,6 @@ struct super_block {
1511 unsigned long s_magic; 1511 unsigned long s_magic;
1512 struct dentry *s_root; 1512 struct dentry *s_root;
1513 struct rw_semaphore s_umount; 1513 struct rw_semaphore s_umount;
1514 struct mutex s_lock;
1515 int s_count; 1514 int s_count;
1516 atomic_t s_active; 1515 atomic_t s_active;
1517#ifdef CONFIG_SECURITY 1516#ifdef CONFIG_SECURITY
@@ -2080,7 +2079,7 @@ extern struct vfsmount *kern_mount_data(struct file_system_type *, void *data);
2080extern void kern_unmount(struct vfsmount *mnt); 2079extern void kern_unmount(struct vfsmount *mnt);
2081extern int may_umount_tree(struct vfsmount *); 2080extern int may_umount_tree(struct vfsmount *);
2082extern int may_umount(struct vfsmount *); 2081extern int may_umount(struct vfsmount *);
2083extern long do_mount(char *, char *, char *, unsigned long, void *); 2082extern long do_mount(const char *, const char *, const char *, unsigned long, void *);
2084extern struct vfsmount *collect_mounts(struct path *); 2083extern struct vfsmount *collect_mounts(struct path *);
2085extern void drop_collected_mounts(struct vfsmount *); 2084extern void drop_collected_mounts(struct vfsmount *);
2086extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, 2085extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *,
diff --git a/include/linux/lglock.h b/include/linux/lglock.h
index f01e5f6d1f07..0d24e932db0b 100644
--- a/include/linux/lglock.h
+++ b/include/linux/lglock.h
@@ -32,20 +32,13 @@
32#define br_write_lock(name) lg_global_lock(name) 32#define br_write_lock(name) lg_global_lock(name)
33#define br_write_unlock(name) lg_global_unlock(name) 33#define br_write_unlock(name) lg_global_unlock(name)
34 34
35#define DEFINE_BRLOCK(name) DEFINE_LGLOCK(name) 35#define DEFINE_BRLOCK(name) DEFINE_LGLOCK(name)
36#define DEFINE_STATIC_BRLOCK(name) DEFINE_STATIC_LGLOCK(name)
36 37
37#ifdef CONFIG_DEBUG_LOCK_ALLOC 38#ifdef CONFIG_DEBUG_LOCK_ALLOC
38#define LOCKDEP_INIT_MAP lockdep_init_map 39#define LOCKDEP_INIT_MAP lockdep_init_map
39
40#define DEFINE_LGLOCK_LOCKDEP(name) \
41 struct lock_class_key name##_lock_key; \
42 struct lockdep_map name##_lock_dep_map; \
43 EXPORT_SYMBOL(name##_lock_dep_map)
44
45#else 40#else
46#define LOCKDEP_INIT_MAP(a, b, c, d) 41#define LOCKDEP_INIT_MAP(a, b, c, d)
47
48#define DEFINE_LGLOCK_LOCKDEP(name)
49#endif 42#endif
50 43
51struct lglock { 44struct lglock {
@@ -57,11 +50,15 @@ struct lglock {
57}; 50};
58 51
59#define DEFINE_LGLOCK(name) \ 52#define DEFINE_LGLOCK(name) \
60 DEFINE_LGLOCK_LOCKDEP(name); \ 53 static DEFINE_PER_CPU(arch_spinlock_t, name ## _lock) \
61 DEFINE_PER_CPU(arch_spinlock_t, name ## _lock) \
62 = __ARCH_SPIN_LOCK_UNLOCKED; \ 54 = __ARCH_SPIN_LOCK_UNLOCKED; \
63 struct lglock name = { .lock = &name ## _lock } 55 struct lglock name = { .lock = &name ## _lock }
64 56
57#define DEFINE_STATIC_LGLOCK(name) \
58 static DEFINE_PER_CPU(arch_spinlock_t, name ## _lock) \
59 = __ARCH_SPIN_LOCK_UNLOCKED; \
60 static struct lglock name = { .lock = &name ## _lock }
61
65void lg_lock_init(struct lglock *lg, char *name); 62void lg_lock_init(struct lglock *lg, char *name);
66void lg_local_lock(struct lglock *lg); 63void lg_local_lock(struct lglock *lg);
67void lg_local_unlock(struct lglock *lg); 64void lg_local_unlock(struct lglock *lg);
diff --git a/include/linux/security.h b/include/linux/security.h
index 5b50c4e1a7c2..05e88bdcf7d9 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -1411,8 +1411,8 @@ struct security_operations {
1411 int (*sb_kern_mount) (struct super_block *sb, int flags, void *data); 1411 int (*sb_kern_mount) (struct super_block *sb, int flags, void *data);
1412 int (*sb_show_options) (struct seq_file *m, struct super_block *sb); 1412 int (*sb_show_options) (struct seq_file *m, struct super_block *sb);
1413 int (*sb_statfs) (struct dentry *dentry); 1413 int (*sb_statfs) (struct dentry *dentry);
1414 int (*sb_mount) (char *dev_name, struct path *path, 1414 int (*sb_mount) (const char *dev_name, struct path *path,
1415 char *type, unsigned long flags, void *data); 1415 const char *type, unsigned long flags, void *data);
1416 int (*sb_umount) (struct vfsmount *mnt, int flags); 1416 int (*sb_umount) (struct vfsmount *mnt, int flags);
1417 int (*sb_pivotroot) (struct path *old_path, 1417 int (*sb_pivotroot) (struct path *old_path,
1418 struct path *new_path); 1418 struct path *new_path);
@@ -1694,8 +1694,8 @@ int security_sb_remount(struct super_block *sb, void *data);
1694int security_sb_kern_mount(struct super_block *sb, int flags, void *data); 1694int security_sb_kern_mount(struct super_block *sb, int flags, void *data);
1695int security_sb_show_options(struct seq_file *m, struct super_block *sb); 1695int security_sb_show_options(struct seq_file *m, struct super_block *sb);
1696int security_sb_statfs(struct dentry *dentry); 1696int security_sb_statfs(struct dentry *dentry);
1697int security_sb_mount(char *dev_name, struct path *path, 1697int security_sb_mount(const char *dev_name, struct path *path,
1698 char *type, unsigned long flags, void *data); 1698 const char *type, unsigned long flags, void *data);
1699int security_sb_umount(struct vfsmount *mnt, int flags); 1699int security_sb_umount(struct vfsmount *mnt, int flags);
1700int security_sb_pivotroot(struct path *old_path, struct path *new_path); 1700int security_sb_pivotroot(struct path *old_path, struct path *new_path);
1701int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts); 1701int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts);
@@ -1964,8 +1964,8 @@ static inline int security_sb_statfs(struct dentry *dentry)
1964 return 0; 1964 return 0;
1965} 1965}
1966 1966
1967static inline int security_sb_mount(char *dev_name, struct path *path, 1967static inline int security_sb_mount(const char *dev_name, struct path *path,
1968 char *type, unsigned long flags, 1968 const char *type, unsigned long flags,
1969 void *data) 1969 void *data)
1970{ 1970{
1971 return 0; 1971 return 0;