aboutsummaryrefslogtreecommitdiffstats
path: root/fs/devpts/inode.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-06 19:35:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-06 19:35:10 -0400
commit57d326169e878a1a37b2bccd1cf81f6809ee67b9 (patch)
tree86ed74ae4dc2beaebce1c67b8459f1873b777d3a /fs/devpts/inode.c
parent7b215de3d0abbc4f6daf2efd19e8809af0564490 (diff)
parent0244756edc4b98c129e92c7061d9f383708cf786 (diff)
Merge branch 'akpm' (patches from Andrew Morton) into next
Merge more updates from Andrew Morton: - Most of the rest of MM. This includes "mark remap_file_pages syscall as deprecated" but the actual "replace remap_file_pages syscall with emulation" is held back. I guess we'll need to work out when to pull the trigger on that one. - various minor cleanups to obscure filesystems - the drivers/rtc queue - hfsplus updates - ufs, hpfs, fatfs, affs, reiserfs - Documentation/ - signals - procfs - cpu hotplug - lib/idr.c - rapidio - sysctl - ipc updates * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (171 commits) ufs: sb mutex merge + mutex_destroy powerpc: update comments for generic idle conversion cris: update comments for generic idle conversion idle: remove cpu_idle() forward declarations nbd: zero from and len fields in NBD_CMD_DISCONNECT. mm: convert some level-less printks to pr_* MAINTAINERS: adi-buildroot-devel is moderated MAINTAINERS: add linux-api for review of API/ABI changes mm/kmemleak-test.c: use pr_fmt for logging fs/dlm/debug_fs.c: replace seq_printf by seq_puts fs/dlm/lockspace.c: convert simple_str to kstr fs/dlm/config.c: convert simple_str to kstr mm: mark remap_file_pages() syscall as deprecated mm: memcontrol: remove unnecessary memcg argument from soft limit functions mm: memcontrol: clean up memcg zoneinfo lookup mm/memblock.c: call kmemleak directly from memblock_(alloc|free) mm/mempool.c: update the kmemleak stack trace for mempool allocations lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations mm: introduce kmemleak_update_trace() mm/kmemleak.c: use %u to print ->checksum ...
Diffstat (limited to 'fs/devpts/inode.c')
-rw-r--r--fs/devpts/inode.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index c71038079b47..cfe8466f7fef 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -10,6 +10,8 @@
10 * 10 *
11 * ------------------------------------------------------------------------- */ 11 * ------------------------------------------------------------------------- */
12 12
13#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
14
13#include <linux/module.h> 15#include <linux/module.h>
14#include <linux/init.h> 16#include <linux/init.h>
15#include <linux/fs.h> 17#include <linux/fs.h>
@@ -148,10 +150,10 @@ static inline struct super_block *pts_sb_from_inode(struct inode *inode)
148 150
149/* 151/*
150 * parse_mount_options(): 152 * parse_mount_options():
151 * Set @opts to mount options specified in @data. If an option is not 153 * Set @opts to mount options specified in @data. If an option is not
152 * specified in @data, set it to its default value. The exception is 154 * specified in @data, set it to its default value. The exception is
153 * 'newinstance' option which can only be set/cleared on a mount (i.e. 155 * 'newinstance' option which can only be set/cleared on a mount (i.e.
154 * cannot be changed during remount). 156 * cannot be changed during remount).
155 * 157 *
156 * Note: @data may be NULL (in which case all options are set to default). 158 * Note: @data may be NULL (in which case all options are set to default).
157 */ 159 */
@@ -225,7 +227,7 @@ static int parse_mount_options(char *data, int op, struct pts_mount_opts *opts)
225 break; 227 break;
226#endif 228#endif
227 default: 229 default:
228 printk(KERN_ERR "devpts: called with bogus options\n"); 230 pr_err("called with bogus options\n");
229 return -EINVAL; 231 return -EINVAL;
230 } 232 }
231 } 233 }
@@ -261,7 +263,7 @@ static int mknod_ptmx(struct super_block *sb)
261 263
262 dentry = d_alloc_name(root, "ptmx"); 264 dentry = d_alloc_name(root, "ptmx");
263 if (!dentry) { 265 if (!dentry) {
264 printk(KERN_NOTICE "Unable to alloc dentry for ptmx node\n"); 266 pr_err("Unable to alloc dentry for ptmx node\n");
265 goto out; 267 goto out;
266 } 268 }
267 269
@@ -270,7 +272,7 @@ static int mknod_ptmx(struct super_block *sb)
270 */ 272 */
271 inode = new_inode(sb); 273 inode = new_inode(sb);
272 if (!inode) { 274 if (!inode) {
273 printk(KERN_ERR "Unable to alloc inode for ptmx node\n"); 275 pr_err("Unable to alloc inode for ptmx node\n");
274 dput(dentry); 276 dput(dentry);
275 goto out; 277 goto out;
276 } 278 }
@@ -303,7 +305,7 @@ static void update_ptmx_mode(struct pts_fs_info *fsi)
303#else 305#else
304static inline void update_ptmx_mode(struct pts_fs_info *fsi) 306static inline void update_ptmx_mode(struct pts_fs_info *fsi)
305{ 307{
306 return; 308 return;
307} 309}
308#endif 310#endif
309 311
@@ -333,9 +335,11 @@ static int devpts_show_options(struct seq_file *seq, struct dentry *root)
333 struct pts_mount_opts *opts = &fsi->mount_opts; 335 struct pts_mount_opts *opts = &fsi->mount_opts;
334 336
335 if (opts->setuid) 337 if (opts->setuid)
336 seq_printf(seq, ",uid=%u", from_kuid_munged(&init_user_ns, opts->uid)); 338 seq_printf(seq, ",uid=%u",
339 from_kuid_munged(&init_user_ns, opts->uid));
337 if (opts->setgid) 340 if (opts->setgid)
338 seq_printf(seq, ",gid=%u", from_kgid_munged(&init_user_ns, opts->gid)); 341 seq_printf(seq, ",gid=%u",
342 from_kgid_munged(&init_user_ns, opts->gid));
339 seq_printf(seq, ",mode=%03o", opts->mode); 343 seq_printf(seq, ",mode=%03o", opts->mode);
340#ifdef CONFIG_DEVPTS_MULTIPLE_INSTANCES 344#ifdef CONFIG_DEVPTS_MULTIPLE_INSTANCES
341 seq_printf(seq, ",ptmxmode=%03o", opts->ptmxmode); 345 seq_printf(seq, ",ptmxmode=%03o", opts->ptmxmode);
@@ -396,7 +400,7 @@ devpts_fill_super(struct super_block *s, void *data, int silent)
396 if (s->s_root) 400 if (s->s_root)
397 return 0; 401 return 0;
398 402
399 printk(KERN_ERR "devpts: get root dentry failed\n"); 403 pr_err("get root dentry failed\n");
400 404
401fail: 405fail:
402 return -ENOMEM; 406 return -ENOMEM;