From 6b520e0565422966cdf1c3759bd73df77b0f248c Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 12 Dec 2011 15:51:45 -0500 Subject: vfs: fix the stupidity with i_dentry in inode destructors Seeing that just about every destructor got that INIT_LIST_HEAD() copied into it, there is no point whatsoever keeping this INIT_LIST_HEAD in inode_init_once(); the cost of taking it into inode_init_always() will be negligible for pipes and sockets and negative for everything else. Not to mention the removal of boilerplate code from ->destroy_inode() instances... Signed-off-by: Al Viro --- arch/powerpc/platforms/cell/spufs/inode.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch') diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index e481f6b9a78..d85f8cbdc8b 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c @@ -74,7 +74,6 @@ spufs_alloc_inode(struct super_block *sb) static void spufs_i_callback(struct rcu_head *head) { struct inode *inode = container_of(head, struct inode, i_rcu); - INIT_LIST_HEAD(&inode->i_dentry); kmem_cache_free(spufs_inode_cache, SPUFS_I(inode)); } -- cgit v1.2.3 From 4c1d5a64f134b254552b6211f6f79a1da667eab7 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 7 Dec 2011 18:21:57 -0500 Subject: vfs: for usbfs, etc. internal vfsmounts ->mnt_sb->s_root == ->mnt_root Signed-off-by: Al Viro --- arch/ia64/kernel/perfmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 89accc626b8..b2c65e034f5 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c @@ -2228,7 +2228,7 @@ pfm_alloc_file(pfm_context_t *ctx) /* * allocate a new dcache entry */ - path.dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this); + path.dentry = d_alloc(pfmfs_mnt->mnt_root, &this); if (!path.dentry) { iput(inode); return ERR_PTR(-ENOMEM); -- cgit v1.2.3 From cf31e70d6cf93f19fe9bf1144966ef40991ac723 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 2 Jan 2012 22:28:36 -0500 Subject: vfs: new helper - vfs_ustat() ... and bury user_get_super()/statfs_by_dentry() - they are purely internal now. Signed-off-by: Al Viro --- arch/parisc/hpux/sys_hpux.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'arch') diff --git a/arch/parisc/hpux/sys_hpux.c b/arch/parisc/hpux/sys_hpux.c index 6ab9580b0b0..d9dc6cd3b7d 100644 --- a/arch/parisc/hpux/sys_hpux.c +++ b/arch/parisc/hpux/sys_hpux.c @@ -136,16 +136,9 @@ struct hpux_ustat { */ static int hpux_ustat(dev_t dev, struct hpux_ustat __user *ubuf) { - struct super_block *s; struct hpux_ustat tmp; /* Changed to hpux_ustat */ struct kstatfs sbuf; - int err = -EINVAL; - - s = user_get_super(dev); - if (s == NULL) - goto out; - err = statfs_by_dentry(s->s_root, &sbuf); - drop_super(s); + int err = vfs_ustat(dev, &sbuf); if (err) goto out; -- cgit v1.2.3 From ff01bb4832651c6d25ac509a06a10fcbd75c461c Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 16 Sep 2011 02:31:11 -0400 Subject: fs: move code out of buffer.c Move invalidate_bdev, block_sync_page into fs/block_dev.c. Export kill_bdev as well, so brd doesn't have to open code it. Reduce buffer_head.h requirement accordingly. Removed a rather large comment from invalidate_bdev, as it looked a bit obsolete to bother moving. The small comment replacing it says enough. Signed-off-by: Nick Piggin Cc: Al Viro Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Al Viro --- arch/powerpc/sysdev/axonram.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch') diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c index ba427191906..1c16141c031 100644 --- a/arch/powerpc/sysdev/axonram.c +++ b/arch/powerpc/sysdev/axonram.c @@ -25,7 +25,6 @@ #include #include -#include #include #include #include -- cgit v1.2.3 From 2c9ede55ecec58099b72e4bb8eab719f32f72c31 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 23 Jul 2011 20:24:48 -0400 Subject: switch device_get_devnode() and ->devnode() to umode_t * both callers of device_get_devnode() are only interested in lower 16bits and nobody tries to return anything wider than 16bit anyway. Signed-off-by: Al Viro --- arch/x86/kernel/cpuid.c | 2 +- arch/x86/kernel/msr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c index 212a6a42527..a524353d93f 100644 --- a/arch/x86/kernel/cpuid.c +++ b/arch/x86/kernel/cpuid.c @@ -177,7 +177,7 @@ static struct notifier_block __refdata cpuid_class_cpu_notifier = .notifier_call = cpuid_class_cpu_callback, }; -static char *cpuid_devnode(struct device *dev, mode_t *mode) +static char *cpuid_devnode(struct device *dev, umode_t *mode) { return kasprintf(GFP_KERNEL, "cpu/%u/cpuid", MINOR(dev->devt)); } diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c index 12fcbe2c143..96356762a51 100644 --- a/arch/x86/kernel/msr.c +++ b/arch/x86/kernel/msr.c @@ -236,7 +236,7 @@ static struct notifier_block __refdata msr_class_cpu_notifier = { .notifier_call = msr_class_cpu_callback, }; -static char *msr_devnode(struct device *dev, mode_t *mode) +static char *msr_devnode(struct device *dev, umode_t *mode) { return kasprintf(GFP_KERNEL, "cpu/%u/msr", MINOR(dev->devt)); } -- cgit v1.2.3 From d161a13f974c72fd7ff0069d39a3ae57cb5694ff Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 24 Jul 2011 03:36:29 -0400 Subject: switch procfs to umode_t use both proc_dir_entry ->mode and populating functions Signed-off-by: Al Viro --- arch/powerpc/kernel/lparcfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 84daabe2fcb..578f35f1872 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c @@ -783,7 +783,7 @@ static const struct file_operations lparcfg_fops = { static int __init lparcfg_init(void) { struct proc_dir_entry *ent; - mode_t mode = S_IRUSR | S_IRGRP | S_IROTH; + umode_t mode = S_IRUSR | S_IRGRP | S_IROTH; /* Allow writing if we have FW_FEATURE_SPLPAR */ if (firmware_has_feature(FW_FEATURE_SPLPAR) && -- cgit v1.2.3 From f4ae40a6a50a98ac23d4b285f739455e926a473e Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 24 Jul 2011 04:33:43 -0400 Subject: switch debugfs to umode_t Signed-off-by: Al Viro --- arch/arm/mach-msm/smd_debug.c | 2 +- arch/s390/include/asm/debug.h | 4 ++-- arch/s390/kernel/debug.c | 8 ++++---- arch/x86/xen/debugfs.c | 2 +- arch/x86/xen/debugfs.h | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-msm/smd_debug.c b/arch/arm/mach-msm/smd_debug.c index 8736afff82f..0c56a5aaf58 100644 --- a/arch/arm/mach-msm/smd_debug.c +++ b/arch/arm/mach-msm/smd_debug.c @@ -215,7 +215,7 @@ static const struct file_operations debug_ops = { .llseek = default_llseek, }; -static void debug_create(const char *name, mode_t mode, +static void debug_create(const char *name, umode_t mode, struct dentry *dent, int (*fill)(char *buf, int max)) { diff --git a/arch/s390/include/asm/debug.h b/arch/s390/include/asm/debug.h index 18124b75a7a..9d88db1f55d 100644 --- a/arch/s390/include/asm/debug.h +++ b/arch/s390/include/asm/debug.h @@ -73,7 +73,7 @@ typedef struct debug_info { struct dentry* debugfs_entries[DEBUG_MAX_VIEWS]; struct debug_view* views[DEBUG_MAX_VIEWS]; char name[DEBUG_MAX_NAME_LEN]; - mode_t mode; + umode_t mode; } debug_info_t; typedef int (debug_header_proc_t) (debug_info_t* id, @@ -124,7 +124,7 @@ debug_info_t *debug_register(const char *name, int pages, int nr_areas, int buf_size); debug_info_t *debug_register_mode(const char *name, int pages, int nr_areas, - int buf_size, mode_t mode, uid_t uid, + int buf_size, umode_t mode, uid_t uid, gid_t gid); void debug_unregister(debug_info_t* id); diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index 5ad6bc078bf..6848828b962 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c @@ -74,7 +74,7 @@ static ssize_t debug_input(struct file *file, const char __user *user_buf, static int debug_open(struct inode *inode, struct file *file); static int debug_close(struct inode *inode, struct file *file); static debug_info_t *debug_info_create(const char *name, int pages_per_area, - int nr_areas, int buf_size, mode_t mode); + int nr_areas, int buf_size, umode_t mode); static void debug_info_get(debug_info_t *); static void debug_info_put(debug_info_t *); static int debug_prolog_level_fn(debug_info_t * id, @@ -330,7 +330,7 @@ debug_info_free(debug_info_t* db_info){ static debug_info_t* debug_info_create(const char *name, int pages_per_area, int nr_areas, - int buf_size, mode_t mode) + int buf_size, umode_t mode) { debug_info_t* rc; @@ -688,7 +688,7 @@ debug_close(struct inode *inode, struct file *file) */ debug_info_t *debug_register_mode(const char *name, int pages_per_area, - int nr_areas, int buf_size, mode_t mode, + int nr_areas, int buf_size, umode_t mode, uid_t uid, gid_t gid) { debug_info_t *rc = NULL; @@ -1090,7 +1090,7 @@ debug_register_view(debug_info_t * id, struct debug_view *view) int rc = 0; int i; unsigned long flags; - mode_t mode; + umode_t mode; struct dentry *pde; if (!id) diff --git a/arch/x86/xen/debugfs.c b/arch/x86/xen/debugfs.c index 7c0fedd98ea..ef1db1900d8 100644 --- a/arch/x86/xen/debugfs.c +++ b/arch/x86/xen/debugfs.c @@ -109,7 +109,7 @@ static const struct file_operations u32_array_fops = { .llseek = no_llseek, }; -struct dentry *xen_debugfs_create_u32_array(const char *name, mode_t mode, +struct dentry *xen_debugfs_create_u32_array(const char *name, umode_t mode, struct dentry *parent, u32 *array, unsigned elements) { diff --git a/arch/x86/xen/debugfs.h b/arch/x86/xen/debugfs.h index e2813208483..78d25499be5 100644 --- a/arch/x86/xen/debugfs.h +++ b/arch/x86/xen/debugfs.h @@ -3,7 +3,7 @@ struct dentry * __init xen_init_debugfs(void); -struct dentry *xen_debugfs_create_u32_array(const char *name, mode_t mode, +struct dentry *xen_debugfs_create_u32_array(const char *name, umode_t mode, struct dentry *parent, u32 *array, unsigned elements); -- cgit v1.2.3 From fec0ebaed9ed074392551ea7324c6668f7d527fd Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 24 Jul 2011 23:30:19 -0400 Subject: hypfs: umode_t noise and properly spelled S_ISDIR/S_ISREG Signed-off-by: Al Viro --- arch/s390/hypfs/inode.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'arch') diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c index 481f4f76f66..98efd2d6207 100644 --- a/arch/s390/hypfs/inode.c +++ b/arch/s390/hypfs/inode.c @@ -97,7 +97,7 @@ static void hypfs_delete_tree(struct dentry *root) } } -static struct inode *hypfs_make_inode(struct super_block *sb, int mode) +static struct inode *hypfs_make_inode(struct super_block *sb, umode_t mode) { struct inode *ret = new_inode(sb); @@ -107,7 +107,7 @@ static struct inode *hypfs_make_inode(struct super_block *sb, int mode) ret->i_uid = hypfs_info->uid; ret->i_gid = hypfs_info->gid; ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME; - if (mode & S_IFDIR) + if (S_ISDIR(mode)) set_nlink(ret, 2); } return ret; @@ -333,7 +333,7 @@ static void hypfs_kill_super(struct super_block *sb) static struct dentry *hypfs_create_file(struct super_block *sb, struct dentry *parent, const char *name, - char *data, mode_t mode) + char *data, umode_t mode) { struct dentry *dentry; struct inode *inode; @@ -350,13 +350,13 @@ static struct dentry *hypfs_create_file(struct super_block *sb, dentry = ERR_PTR(-ENOMEM); goto fail; } - if (mode & S_IFREG) { + if (S_ISREG(mode)) { inode->i_fop = &hypfs_file_ops; if (data) inode->i_size = strlen(data); else inode->i_size = 0; - } else if (mode & S_IFDIR) { + } else if (S_ISDIR(mode)) { inode->i_op = &simple_dir_inode_operations; inode->i_fop = &simple_dir_operations; inc_nlink(parent->d_inode); -- cgit v1.2.3 From c6684b26854000d406c9fa0698443c50f2bf2cba Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 26 Jul 2011 04:47:14 -0400 Subject: switch spufs guts to umode_t Signed-off-by: Al Viro --- arch/powerpc/include/asm/spu.h | 2 +- arch/powerpc/platforms/cell/spufs/inode.c | 16 ++++++++-------- arch/powerpc/platforms/cell/spufs/spufs.h | 4 ++-- arch/powerpc/platforms/cell/spufs/syscalls.c | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'arch') diff --git a/arch/powerpc/include/asm/spu.h b/arch/powerpc/include/asm/spu.h index 4e360bd4a35..c52640089c9 100644 --- a/arch/powerpc/include/asm/spu.h +++ b/arch/powerpc/include/asm/spu.h @@ -237,7 +237,7 @@ extern long spu_sys_callback(struct spu_syscall_block *s); struct file; struct spufs_calls { long (*create_thread)(const char __user *name, - unsigned int flags, mode_t mode, + unsigned int flags, umode_t mode, struct file *neighbor); long (*spu_run)(struct file *filp, __u32 __user *unpc, __u32 __user *ustatus); diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index d85f8cbdc8b..d4a094ca96f 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c @@ -91,7 +91,7 @@ spufs_init_once(void *p) } static struct inode * -spufs_new_inode(struct super_block *sb, int mode) +spufs_new_inode(struct super_block *sb, umode_t mode) { struct inode *inode; @@ -123,7 +123,7 @@ spufs_setattr(struct dentry *dentry, struct iattr *attr) static int spufs_new_file(struct super_block *sb, struct dentry *dentry, - const struct file_operations *fops, int mode, + const struct file_operations *fops, umode_t mode, size_t size, struct spu_context *ctx) { static const struct inode_operations spufs_file_iops = { @@ -193,7 +193,7 @@ static int spufs_rmdir(struct inode *parent, struct dentry *dir) } static int spufs_fill_dir(struct dentry *dir, - const struct spufs_tree_descr *files, int mode, + const struct spufs_tree_descr *files, umode_t mode, struct spu_context *ctx) { struct dentry *dentry, *tmp; @@ -263,7 +263,7 @@ EXPORT_SYMBOL_GPL(spufs_context_fops); static int spufs_mkdir(struct inode *dir, struct dentry *dentry, unsigned int flags, - int mode) + umode_t mode) { int ret; struct inode *inode; @@ -446,7 +446,7 @@ spufs_set_affinity(unsigned int flags, struct spu_context *ctx, static int spufs_create_context(struct inode *inode, struct dentry *dentry, - struct vfsmount *mnt, int flags, int mode, + struct vfsmount *mnt, int flags, umode_t mode, struct file *aff_filp) { int ret; @@ -520,7 +520,7 @@ out: } static int -spufs_mkgang(struct inode *dir, struct dentry *dentry, int mode) +spufs_mkgang(struct inode *dir, struct dentry *dentry, umode_t mode) { int ret; struct inode *inode; @@ -583,7 +583,7 @@ out: static int spufs_create_gang(struct inode *inode, struct dentry *dentry, - struct vfsmount *mnt, int mode) + struct vfsmount *mnt, umode_t mode) { int ret; @@ -611,7 +611,7 @@ out: static struct file_system_type spufs_type; long spufs_create(struct path *path, struct dentry *dentry, - unsigned int flags, mode_t mode, struct file *filp) + unsigned int flags, umode_t mode, struct file *filp) { int ret; diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h index 099245f230b..67852ade4c0 100644 --- a/arch/powerpc/platforms/cell/spufs/spufs.h +++ b/arch/powerpc/platforms/cell/spufs/spufs.h @@ -237,7 +237,7 @@ struct spufs_inode_info { struct spufs_tree_descr { const char *name; const struct file_operations *ops; - int mode; + umode_t mode; size_t size; }; @@ -249,7 +249,7 @@ extern const struct spufs_tree_descr spufs_dir_debug_contents[]; extern struct spufs_calls spufs_calls; long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *status); long spufs_create(struct path *nd, struct dentry *dentry, unsigned int flags, - mode_t mode, struct file *filp); + umode_t mode, struct file *filp); /* ELF coredump callbacks for writing SPU ELF notes */ extern int spufs_coredump_extra_notes_size(void); extern int spufs_coredump_extra_notes_write(struct file *file, loff_t *foffset); diff --git a/arch/powerpc/platforms/cell/spufs/syscalls.c b/arch/powerpc/platforms/cell/spufs/syscalls.c index 71a5b520726..8591bb62d7f 100644 --- a/arch/powerpc/platforms/cell/spufs/syscalls.c +++ b/arch/powerpc/platforms/cell/spufs/syscalls.c @@ -60,7 +60,7 @@ out: } static long do_spu_create(const char __user *pathname, unsigned int flags, - mode_t mode, struct file *neighbor) + umode_t mode, struct file *neighbor) { struct path path; struct dentry *dentry; -- cgit v1.2.3 From 1bc94226d5c642b78cf6b2e3e843ef24eb740df0 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 26 Jul 2011 16:50:23 -0400 Subject: switch spu_create(2) to use of SYSCALL_DEFINE4, make it use umode_t Signed-off-by: Al Viro --- arch/powerpc/platforms/cell/spu_syscalls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/powerpc/platforms/cell/spu_syscalls.c b/arch/powerpc/platforms/cell/spu_syscalls.c index 75530d99eda..714bbfc3162 100644 --- a/arch/powerpc/platforms/cell/spu_syscalls.c +++ b/arch/powerpc/platforms/cell/spu_syscalls.c @@ -65,8 +65,8 @@ static inline void spufs_calls_put(struct spufs_calls *calls) { } #endif /* CONFIG_SPU_FS_MODULE */ -asmlinkage long sys_spu_create(const char __user *name, - unsigned int flags, mode_t mode, int neighbor_fd) +SYSCALL_DEFINE4(spu_create, const char __user *, name, unsigned int, flags, + umode_t, mode, int, neighbor_fd) { long ret; struct file *neighbor; -- cgit v1.2.3 From 0583fcc96bb117763c0fa74c123573c0112dec65 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 26 Jul 2011 17:04:15 -0400 Subject: consolidate umode_t declarations Signed-off-by: Al Viro --- arch/alpha/include/asm/types.h | 5 ----- arch/arm/include/asm/types.h | 6 ------ arch/avr32/include/asm/types.h | 6 ------ arch/cris/include/asm/types.h | 6 ------ arch/frv/include/asm/types.h | 6 ------ arch/h8300/include/asm/types.h | 17 ----------------- arch/ia64/include/asm/types.h | 2 -- arch/m32r/include/asm/types.h | 6 ------ arch/m68k/include/asm/types.h | 6 ------ arch/mips/include/asm/types.h | 6 ------ arch/mn10300/include/asm/types.h | 6 ------ arch/parisc/include/asm/types.h | 6 ------ arch/powerpc/include/asm/types.h | 6 ------ arch/s390/include/asm/types.h | 2 -- arch/sparc/include/asm/posix_types.h | 2 -- arch/sparc/include/asm/types.h | 6 ------ arch/xtensa/include/asm/types.h | 2 -- 17 files changed, 96 deletions(-) (limited to 'arch') diff --git a/arch/alpha/include/asm/types.h b/arch/alpha/include/asm/types.h index 881544339c2..0a0579076f4 100644 --- a/arch/alpha/include/asm/types.h +++ b/arch/alpha/include/asm/types.h @@ -15,9 +15,4 @@ #include #endif -#ifndef __ASSEMBLY__ - -typedef unsigned int umode_t; - -#endif /* __ASSEMBLY__ */ #endif /* _ALPHA_TYPES_H */ diff --git a/arch/arm/include/asm/types.h b/arch/arm/include/asm/types.h index 48192ac3a23..28beab917ff 100644 --- a/arch/arm/include/asm/types.h +++ b/arch/arm/include/asm/types.h @@ -3,12 +3,6 @@ #include -#ifndef __ASSEMBLY__ - -typedef unsigned short umode_t; - -#endif /* __ASSEMBLY__ */ - /* * These aren't exported outside the kernel to avoid name space clashes */ diff --git a/arch/avr32/include/asm/types.h b/arch/avr32/include/asm/types.h index 72667a3b1af..9bb2d8b2e6c 100644 --- a/arch/avr32/include/asm/types.h +++ b/arch/avr32/include/asm/types.h @@ -10,12 +10,6 @@ #include -#ifndef __ASSEMBLY__ - -typedef unsigned short umode_t; - -#endif /* __ASSEMBLY__ */ - /* * These aren't exported outside the kernel to avoid name space clashes */ diff --git a/arch/cris/include/asm/types.h b/arch/cris/include/asm/types.h index 551a12c0aa0..adaf82780bb 100644 --- a/arch/cris/include/asm/types.h +++ b/arch/cris/include/asm/types.h @@ -3,12 +3,6 @@ #include -#ifndef __ASSEMBLY__ - -typedef unsigned short umode_t; - -#endif /* __ASSEMBLY__ */ - /* * These aren't exported outside the kernel to avoid name space clashes */ diff --git a/arch/frv/include/asm/types.h b/arch/frv/include/asm/types.h index aa3e7fdc7f2..390a612f3a5 100644 --- a/arch/frv/include/asm/types.h +++ b/arch/frv/include/asm/types.h @@ -14,12 +14,6 @@ #include -#ifndef __ASSEMBLY__ - -typedef unsigned short umode_t; - -#endif /* __ASSEMBLY__ */ - /* * These aren't exported outside the kernel to avoid name space clashes */ diff --git a/arch/h8300/include/asm/types.h b/arch/h8300/include/asm/types.h index bb2c91a3522..07257d9487d 100644 --- a/arch/h8300/include/asm/types.h +++ b/arch/h8300/include/asm/types.h @@ -3,27 +3,10 @@ #include -#if !defined(__ASSEMBLY__) - -/* - * This file is never included by application software unless - * explicitly requested (e.g., via linux/types.h) in which case the - * application is Linux specific so (user-) name space pollution is - * not a major issue. However, for interoperability, libraries still - * need to be careful to avoid a name clashes. - */ - -typedef unsigned short umode_t; - -/* - * These aren't exported outside the kernel to avoid name space clashes - */ #ifdef __KERNEL__ #define BITS_PER_LONG 32 #endif /* __KERNEL__ */ -#endif /* __ASSEMBLY__ */ - #endif /* _H8300_TYPES_H */ diff --git a/arch/ia64/include/asm/types.h b/arch/ia64/include/asm/types.h index 82b3939d271..3f5b122d997 100644 --- a/arch/ia64/include/asm/types.h +++ b/arch/ia64/include/asm/types.h @@ -28,8 +28,6 @@ # define __IA64_UL(x) ((unsigned long)(x)) # define __IA64_UL_CONST(x) x##UL -typedef unsigned int umode_t; - /* * These aren't exported outside the kernel to avoid name space clashes */ diff --git a/arch/m32r/include/asm/types.h b/arch/m32r/include/asm/types.h index bd0035597b3..bb2eeadecf9 100644 --- a/arch/m32r/include/asm/types.h +++ b/arch/m32r/include/asm/types.h @@ -3,12 +3,6 @@ #include -#ifndef __ASSEMBLY__ - -typedef unsigned short umode_t; - -#endif /* __ASSEMBLY__ */ - /* * These aren't exported outside the kernel to avoid name space clashes */ diff --git a/arch/m68k/include/asm/types.h b/arch/m68k/include/asm/types.h index b17fd115a4e..89705adcbd5 100644 --- a/arch/m68k/include/asm/types.h +++ b/arch/m68k/include/asm/types.h @@ -10,12 +10,6 @@ */ #include -#ifndef __ASSEMBLY__ - -typedef unsigned short umode_t; - -#endif /* __ASSEMBLY__ */ - /* * These aren't exported outside the kernel to avoid name space clashes */ diff --git a/arch/mips/include/asm/types.h b/arch/mips/include/asm/types.h index 533812b6188..43bf70ebd3a 100644 --- a/arch/mips/include/asm/types.h +++ b/arch/mips/include/asm/types.h @@ -21,12 +21,6 @@ # include #endif -#ifndef __ASSEMBLY__ - -typedef unsigned short umode_t; - -#endif /* __ASSEMBLY__ */ - /* * These aren't exported outside the kernel to avoid name space clashes */ diff --git a/arch/mn10300/include/asm/types.h b/arch/mn10300/include/asm/types.h index c1833eb192e..713d4ba108a 100644 --- a/arch/mn10300/include/asm/types.h +++ b/arch/mn10300/include/asm/types.h @@ -13,12 +13,6 @@ #include -#ifndef __ASSEMBLY__ - -typedef unsigned short umode_t; - -#endif /* __ASSEMBLY__ */ - /* * These aren't exported outside the kernel to avoid name space clashes */ diff --git a/arch/parisc/include/asm/types.h b/arch/parisc/include/asm/types.h index 80e415c9936..8866f9bbdea 100644 --- a/arch/parisc/include/asm/types.h +++ b/arch/parisc/include/asm/types.h @@ -3,10 +3,4 @@ #include -#ifndef __ASSEMBLY__ - -typedef unsigned short umode_t; - -#endif /* __ASSEMBLY__ */ - #endif diff --git a/arch/powerpc/include/asm/types.h b/arch/powerpc/include/asm/types.h index 8947b9827bc..b15a52e84b3 100644 --- a/arch/powerpc/include/asm/types.h +++ b/arch/powerpc/include/asm/types.h @@ -27,12 +27,6 @@ * 2 of the License, or (at your option) any later version. */ -#ifdef __powerpc64__ -typedef unsigned int umode_t; -#else -typedef unsigned short umode_t; -#endif - typedef struct { __u32 u[4]; } __attribute__((aligned(16))) __vector128; diff --git a/arch/s390/include/asm/types.h b/arch/s390/include/asm/types.h index eeb52ccf499..05ebbcdbbf6 100644 --- a/arch/s390/include/asm/types.h +++ b/arch/s390/include/asm/types.h @@ -13,8 +13,6 @@ #ifndef __ASSEMBLY__ -typedef unsigned short umode_t; - /* A address type so that arithmetic can be done on it & it can be upgraded to 64 bit when necessary */ diff --git a/arch/sparc/include/asm/posix_types.h b/arch/sparc/include/asm/posix_types.h index 98d6ebb922f..dbfc1a34b3a 100644 --- a/arch/sparc/include/asm/posix_types.h +++ b/arch/sparc/include/asm/posix_types.h @@ -20,7 +20,6 @@ typedef unsigned int __kernel_uid_t; typedef unsigned int __kernel_gid_t; typedef unsigned long __kernel_ino_t; typedef unsigned int __kernel_mode_t; -typedef unsigned short __kernel_umode_t; typedef unsigned int __kernel_nlink_t; typedef int __kernel_daddr_t; typedef long __kernel_off_t; @@ -55,7 +54,6 @@ typedef unsigned short __kernel_uid_t; typedef unsigned short __kernel_gid_t; typedef unsigned long __kernel_ino_t; typedef unsigned short __kernel_mode_t; -typedef unsigned short __kernel_umode_t; typedef short __kernel_nlink_t; typedef long __kernel_daddr_t; typedef long __kernel_off_t; diff --git a/arch/sparc/include/asm/types.h b/arch/sparc/include/asm/types.h index 91e5a034f98..383d156cde9 100644 --- a/arch/sparc/include/asm/types.h +++ b/arch/sparc/include/asm/types.h @@ -12,12 +12,6 @@ #include -#ifndef __ASSEMBLY__ - -typedef unsigned short umode_t; - -#endif /* __ASSEMBLY__ */ - #endif /* defined(__sparc__) */ #endif /* defined(_SPARC_TYPES_H) */ diff --git a/arch/xtensa/include/asm/types.h b/arch/xtensa/include/asm/types.h index b1c981e39b5..6d4db7e8ffa 100644 --- a/arch/xtensa/include/asm/types.h +++ b/arch/xtensa/include/asm/types.h @@ -23,8 +23,6 @@ #ifndef __ASSEMBLY__ -typedef unsigned short umode_t; - /* * These aren't exported outside the kernel to avoid name space clashes */ -- cgit v1.2.3 From 84dfa9897ef913771af44484fefbe0de29fdce51 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 27 Jul 2011 14:54:36 -0400 Subject: consolidate a bunch of ipcbuf.h instances ... some still remain weird :-/ Signed-off-by: Al Viro --- arch/alpha/include/asm/ipcbuf.h | 29 +---------------------------- arch/arm/include/asm/ipcbuf.h | 30 +----------------------------- arch/avr32/include/asm/ipcbuf.h | 30 +----------------------------- arch/cris/include/asm/ipcbuf.h | 30 +----------------------------- arch/frv/include/asm/ipcbuf.h | 31 +------------------------------ arch/h8300/include/asm/ipcbuf.h | 30 +----------------------------- arch/ia64/include/asm/ipcbuf.h | 29 +---------------------------- arch/m32r/include/asm/ipcbuf.h | 30 +----------------------------- arch/m68k/include/asm/ipcbuf.h | 30 +----------------------------- arch/mips/include/asm/ipcbuf.h | 29 +---------------------------- arch/mn10300/include/asm/ipcbuf.h | 30 +----------------------------- 11 files changed, 11 insertions(+), 317 deletions(-) (limited to 'arch') diff --git a/arch/alpha/include/asm/ipcbuf.h b/arch/alpha/include/asm/ipcbuf.h index d9c0e1a5070..84c7e51cb6d 100644 --- a/arch/alpha/include/asm/ipcbuf.h +++ b/arch/alpha/include/asm/ipcbuf.h @@ -1,28 +1 @@ -#ifndef _ALPHA_IPCBUF_H -#define _ALPHA_IPCBUF_H - -/* - * The ipc64_perm structure for alpha architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 32-bit seq - * - 2 miscellaneous 64-bit values - */ - -struct ipc64_perm -{ - __kernel_key_t key; - __kernel_uid_t uid; - __kernel_gid_t gid; - __kernel_uid_t cuid; - __kernel_gid_t cgid; - __kernel_mode_t mode; - unsigned short seq; - unsigned short __pad1; - unsigned long __unused1; - unsigned long __unused2; -}; - -#endif /* _ALPHA_IPCBUF_H */ +#include diff --git a/arch/arm/include/asm/ipcbuf.h b/arch/arm/include/asm/ipcbuf.h index 97683975f7d..84c7e51cb6d 100644 --- a/arch/arm/include/asm/ipcbuf.h +++ b/arch/arm/include/asm/ipcbuf.h @@ -1,29 +1 @@ -#ifndef __ASMARM_IPCBUF_H -#define __ASMARM_IPCBUF_H - -/* - * The ipc64_perm structure for arm architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 32-bit mode_t and seq - * - 2 miscellaneous 32-bit values - */ - -struct ipc64_perm -{ - __kernel_key_t key; - __kernel_uid32_t uid; - __kernel_gid32_t gid; - __kernel_uid32_t cuid; - __kernel_gid32_t cgid; - __kernel_mode_t mode; - unsigned short __pad1; - unsigned short seq; - unsigned short __pad2; - unsigned long __unused1; - unsigned long __unused2; -}; - -#endif /* __ASMARM_IPCBUF_H */ +#include diff --git a/arch/avr32/include/asm/ipcbuf.h b/arch/avr32/include/asm/ipcbuf.h index 1552c9698f5..84c7e51cb6d 100644 --- a/arch/avr32/include/asm/ipcbuf.h +++ b/arch/avr32/include/asm/ipcbuf.h @@ -1,29 +1 @@ -#ifndef __ASM_AVR32_IPCBUF_H -#define __ASM_AVR32_IPCBUF_H - -/* -* The user_ipc_perm structure for AVR32 architecture. -* Note extra padding because this structure is passed back and forth -* between kernel and user space. -* -* Pad space is left for: -* - 32-bit mode_t and seq -* - 2 miscellaneous 32-bit values -*/ - -struct ipc64_perm -{ - __kernel_key_t key; - __kernel_uid32_t uid; - __kernel_gid32_t gid; - __kernel_uid32_t cuid; - __kernel_gid32_t cgid; - __kernel_mode_t mode; - unsigned short __pad1; - unsigned short seq; - unsigned short __pad2; - unsigned long __unused1; - unsigned long __unused2; -}; - -#endif /* __ASM_AVR32_IPCBUF_H */ +#include diff --git a/arch/cris/include/asm/ipcbuf.h b/arch/cris/include/asm/ipcbuf.h index 8b0c18b0284..84c7e51cb6d 100644 --- a/arch/cris/include/asm/ipcbuf.h +++ b/arch/cris/include/asm/ipcbuf.h @@ -1,29 +1 @@ -#ifndef __CRIS_IPCBUF_H__ -#define __CRIS_IPCBUF_H__ - -/* - * The user_ipc_perm structure for CRIS architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 32-bit mode_t and seq - * - 2 miscellaneous 32-bit values - */ - -struct ipc64_perm -{ - __kernel_key_t key; - __kernel_uid32_t uid; - __kernel_gid32_t gid; - __kernel_uid32_t cuid; - __kernel_gid32_t cgid; - __kernel_mode_t mode; - unsigned short __pad1; - unsigned short seq; - unsigned short __pad2; - unsigned long __unused1; - unsigned long __unused2; -}; - -#endif /* __CRIS_IPCBUF_H__ */ +#include diff --git a/arch/frv/include/asm/ipcbuf.h b/arch/frv/include/asm/ipcbuf.h index b546f67e455..84c7e51cb6d 100644 --- a/arch/frv/include/asm/ipcbuf.h +++ b/arch/frv/include/asm/ipcbuf.h @@ -1,30 +1 @@ -#ifndef __ASM_IPCBUF_H__ -#define __ASM_IPCBUF_H__ - -/* - * The user_ipc_perm structure for FR-V architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 32-bit mode_t and seq - * - 2 miscellaneous 32-bit values - */ - -struct ipc64_perm -{ - __kernel_key_t key; - __kernel_uid32_t uid; - __kernel_gid32_t gid; - __kernel_uid32_t cuid; - __kernel_gid32_t cgid; - __kernel_mode_t mode; - unsigned short __pad1; - unsigned short seq; - unsigned short __pad2; - unsigned long __unused1; - unsigned long __unused2; -}; - -#endif /* __ASM_IPCBUF_H__ */ - +#include diff --git a/arch/h8300/include/asm/ipcbuf.h b/arch/h8300/include/asm/ipcbuf.h index 2cd1ebcc109..84c7e51cb6d 100644 --- a/arch/h8300/include/asm/ipcbuf.h +++ b/arch/h8300/include/asm/ipcbuf.h @@ -1,29 +1 @@ -#ifndef __H8300_IPCBUF_H__ -#define __H8300_IPCBUF_H__ - -/* - * The user_ipc_perm structure for H8/300 architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 32-bit mode_t and seq - * - 2 miscellaneous 32-bit values - */ - -struct ipc64_perm -{ - __kernel_key_t key; - __kernel_uid32_t uid; - __kernel_gid32_t gid; - __kernel_uid32_t cuid; - __kernel_gid32_t cgid; - __kernel_mode_t mode; - unsigned short __pad1; - unsigned short seq; - unsigned short __pad2; - unsigned long __unused1; - unsigned long __unused2; -}; - -#endif /* __H8300_IPCBUF_H__ */ +#include diff --git a/arch/ia64/include/asm/ipcbuf.h b/arch/ia64/include/asm/ipcbuf.h index 079899ae7d3..84c7e51cb6d 100644 --- a/arch/ia64/include/asm/ipcbuf.h +++ b/arch/ia64/include/asm/ipcbuf.h @@ -1,28 +1 @@ -#ifndef _ASM_IA64_IPCBUF_H -#define _ASM_IA64_IPCBUF_H - -/* - * The ipc64_perm structure for IA-64 architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 32-bit seq - * - 2 miscellaneous 64-bit values - */ - -struct ipc64_perm -{ - __kernel_key_t key; - __kernel_uid_t uid; - __kernel_gid_t gid; - __kernel_uid_t cuid; - __kernel_gid_t cgid; - __kernel_mode_t mode; - unsigned short seq; - unsigned short __pad1; - unsigned long __unused1; - unsigned long __unused2; -}; - -#endif /* _ASM_IA64_IPCBUF_H */ +#include diff --git a/arch/m32r/include/asm/ipcbuf.h b/arch/m32r/include/asm/ipcbuf.h index 8d2d7c8ffdb..84c7e51cb6d 100644 --- a/arch/m32r/include/asm/ipcbuf.h +++ b/arch/m32r/include/asm/ipcbuf.h @@ -1,29 +1 @@ -#ifndef _ASM_M32R_IPCBUF_H -#define _ASM_M32R_IPCBUF_H - -/* - * The ipc64_perm structure for m32r architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 32-bit mode_t and seq - * - 2 miscellaneous 32-bit values - */ - -struct ipc64_perm -{ - __kernel_key_t key; - __kernel_uid32_t uid; - __kernel_gid32_t gid; - __kernel_uid32_t cuid; - __kernel_gid32_t cgid; - __kernel_mode_t mode; - unsigned short __pad1; - unsigned short seq; - unsigned short __pad2; - unsigned long __unused1; - unsigned long __unused2; -}; - -#endif /* _ASM_M32R_IPCBUF_H */ +#include diff --git a/arch/m68k/include/asm/ipcbuf.h b/arch/m68k/include/asm/ipcbuf.h index a623ea3f095..84c7e51cb6d 100644 --- a/arch/m68k/include/asm/ipcbuf.h +++ b/arch/m68k/include/asm/ipcbuf.h @@ -1,29 +1 @@ -#ifndef __m68k_IPCBUF_H__ -#define __m68k_IPCBUF_H__ - -/* - * The user_ipc_perm structure for m68k architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 32-bit mode_t and seq - * - 2 miscellaneous 32-bit values - */ - -struct ipc64_perm -{ - __kernel_key_t key; - __kernel_uid32_t uid; - __kernel_gid32_t gid; - __kernel_uid32_t cuid; - __kernel_gid32_t cgid; - __kernel_mode_t mode; - unsigned short __pad1; - unsigned short seq; - unsigned short __pad2; - unsigned long __unused1; - unsigned long __unused2; -}; - -#endif /* __m68k_IPCBUF_H__ */ +#include diff --git a/arch/mips/include/asm/ipcbuf.h b/arch/mips/include/asm/ipcbuf.h index d47d08f264e..84c7e51cb6d 100644 --- a/arch/mips/include/asm/ipcbuf.h +++ b/arch/mips/include/asm/ipcbuf.h @@ -1,28 +1 @@ -#ifndef _ASM_IPCBUF_H -#define _ASM_IPCBUF_H - -/* - * The ipc64_perm structure for alpha architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 32-bit seq - * - 2 miscellaneous 64-bit values - */ - -struct ipc64_perm -{ - __kernel_key_t key; - __kernel_uid_t uid; - __kernel_gid_t gid; - __kernel_uid_t cuid; - __kernel_gid_t cgid; - __kernel_mode_t mode; - unsigned short seq; - unsigned short __pad1; - unsigned long __unused1; - unsigned long __unused2; -}; - -#endif /* _ASM_IPCBUF_H */ +#include diff --git a/arch/mn10300/include/asm/ipcbuf.h b/arch/mn10300/include/asm/ipcbuf.h index f6f63d44827..84c7e51cb6d 100644 --- a/arch/mn10300/include/asm/ipcbuf.h +++ b/arch/mn10300/include/asm/ipcbuf.h @@ -1,29 +1 @@ -#ifndef _ASM_IPCBUF_H -#define _ASM_IPCBUF_H - -/* - * The ipc64_perm structure for MN10300 architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 32-bit mode_t and seq - * - 2 miscellaneous 32-bit values - */ - -struct ipc64_perm -{ - __kernel_key_t key; - __kernel_uid32_t uid; - __kernel_gid32_t gid; - __kernel_uid32_t cuid; - __kernel_gid32_t cgid; - __kernel_mode_t mode; - unsigned short __pad1; - unsigned short seq; - unsigned short __pad2; - unsigned long __unused1; - unsigned long __unused2; -}; - -#endif /* _ASM_IPCBUF_H */ +#include -- cgit v1.2.3 From 34c80b1d93e6e20ca9dea0baf583a5b5510d92d4 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 8 Dec 2011 21:32:45 -0500 Subject: vfs: switch ->show_options() to struct dentry * Signed-off-by: Al Viro --- arch/s390/hypfs/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c index 98efd2d6207..8a2a887478c 100644 --- a/arch/s390/hypfs/inode.c +++ b/arch/s390/hypfs/inode.c @@ -259,9 +259,9 @@ static int hypfs_parse_options(char *options, struct super_block *sb) return 0; } -static int hypfs_show_options(struct seq_file *s, struct vfsmount *mnt) +static int hypfs_show_options(struct seq_file *s, struct dentry *root) { - struct hypfs_sb_info *hypfs_info = mnt->mnt_sb->s_fs_info; + struct hypfs_sb_info *hypfs_info = root->d_sb->s_fs_info; seq_printf(s, ",uid=%u", hypfs_info->uid); seq_printf(s, ",gid=%u", hypfs_info->gid); -- cgit v1.2.3