Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c32c2f63 authored by Jan Blunck's avatar Jan Blunck Committed by Linus Torvalds
Browse files

d_path: Make seq_path() use a struct path argument



seq_path() is always called with a dentry and a vfsmount from a struct path.
Make seq_path() take it directly as an argument.

Signed-off-by: default avatarJan Blunck <jblunck@suse.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e83aece3
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -5197,8 +5197,7 @@ static int md_seq_show(struct seq_file *seq, void *v)
				chunk_kb ? "KB" : "B");
			if (bitmap->file) {
				seq_printf(seq, ", file: ");
				seq_path(seq, bitmap->file->f_path.mnt,
					 bitmap->file->f_path.dentry," \t\n");
				seq_path(seq, &bitmap->file->f_path, " \t\n");
			}

			seq_printf(seq, "\n");
+4 −2
Original line number Diff line number Diff line
@@ -408,10 +408,11 @@ static int show_vfsmnt(struct seq_file *m, void *v)
		{ 0, NULL }
	};
	struct proc_fs_info *fs_infop;
	struct path mnt_path = { .dentry = mnt->mnt_root, .mnt = mnt };

	mangle(m, mnt->mnt_devname ? mnt->mnt_devname : "none");
	seq_putc(m, ' ');
	seq_path(m, mnt, mnt->mnt_root, " \t\n\\");
	seq_path(m, &mnt_path, " \t\n\\");
	seq_putc(m, ' ');
	mangle(m, mnt->mnt_sb->s_type->name);
	if (mnt->mnt_sb->s_subtype && mnt->mnt_sb->s_subtype[0]) {
@@ -443,6 +444,7 @@ struct seq_operations mounts_op = {
static int show_vfsstat(struct seq_file *m, void *v)
{
	struct vfsmount *mnt = list_entry(v, struct vfsmount, mnt_list);
	struct path mnt_path = { .dentry = mnt->mnt_root, .mnt = mnt };
	int err = 0;

	/* device */
@@ -454,7 +456,7 @@ static int show_vfsstat(struct seq_file *m, void *v)

	/* mount point */
	seq_puts(m, " mounted on ");
	seq_path(m, mnt, mnt->mnt_root, " \t\n\\");
	seq_path(m, &mnt_path, " \t\n\\");
	seq_putc(m, ' ');

	/* file system type */
+2 −2
Original line number Diff line number Diff line
@@ -203,7 +203,7 @@ static int expkey_show(struct seq_file *m,
	if (test_bit(CACHE_VALID, &h->flags) && 
	    !test_bit(CACHE_NEGATIVE, &h->flags)) {
		seq_printf(m, " ");
		seq_path(m, ek->ek_path.mnt, ek->ek_path.dentry, "\\ \t\n");
		seq_path(m, &ek->ek_path, "\\ \t\n");
	}
	seq_printf(m, "\n");
	return 0;
@@ -649,7 +649,7 @@ static int svc_export_show(struct seq_file *m,
		return 0;
	}
	exp = container_of(h, struct svc_export, h);
	seq_path(m, exp->ex_path.mnt, exp->ex_path.dentry, " \t\n\\");
	seq_path(m, &exp->ex_path, " \t\n\\");
	seq_putc(m, '\t');
	seq_escape(m, exp->ex_client->name, " \t\n\\");
	seq_putc(m, '(');
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
		if (len < 1)
			len = 1;
		seq_printf(m, "%*c", len, ' ');
		seq_path(m, file->f_path.mnt, file->f_path.dentry, "");
		seq_path(m, &file->f_path, "");
	}

	seq_putc(m, '\n');
+1 −1
Original line number Diff line number Diff line
@@ -271,7 +271,7 @@ static int show_map(struct seq_file *m, void *v)
	 */
	if (file) {
		pad_len_spaces(m, len);
		seq_path(m, file->f_path.mnt, file->f_path.dentry, "\n");
		seq_path(m, &file->f_path, "\n");
	} else {
		const char *name = arch_vma_name(vma);
		if (!name) {
Loading