diff options
Diffstat (limited to 'fs/devpts')
-rw-r--r-- | fs/devpts/inode.c | 26 |
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 |
304 | static inline void update_ptmx_mode(struct pts_fs_info *fsi) | 306 | static 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 | ||
401 | fail: | 405 | fail: |
402 | return -ENOMEM; | 406 | return -ENOMEM; |