Skip to content

Commit

Permalink
Revert "vfs: Export file system uuid via /proc/<pid>/mountinfo"
Browse files Browse the repository at this point in the history
This reverts commit 93f1c20.

It turns out that libmount misparses it because it adds a '-' character
in the uuid string, which libmount then incorrectly confuses with the
separator string (" - ") at the end of all the optional arguments.

Upstream libmount (in the util-linux tree) has been fixed, but until
that fix actually percolates up to users, we'd better not expose this
change in the kernel.

Let's revisit this later (possibly by exposing the UUID without any '-'
characters in it, avoiding the user-space bug).

Reported-by: Dave Jones <davej@redhat.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Karel Zak <kzak@redhat.com>
Cc: Ram Pai <linuxram@us.ibm.com>
Cc: Miklos Szeredi <mszeredi@suse.cz>
Cc: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Linus Torvalds committed Apr 12, 2011
1 parent 16ad569 commit be85bcc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
16 changes: 0 additions & 16 deletions fs/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1030,18 +1030,6 @@ const struct seq_operations mounts_op = {
.show = show_vfsmnt
};

static int uuid_is_nil(u8 *uuid)
{
int i;
u8 *cp = (u8 *)uuid;

for (i = 0; i < 16; i++) {
if (*cp++)
return 0;
}
return 1;
}

static int show_mountinfo(struct seq_file *m, void *v)
{
struct proc_mounts *p = m->private;
Expand Down Expand Up @@ -1085,10 +1073,6 @@ static int show_mountinfo(struct seq_file *m, void *v)
if (IS_MNT_UNBINDABLE(mnt))
seq_puts(m, " unbindable");

if (!uuid_is_nil(mnt->mnt_sb->s_uuid))
/* print the uuid */
seq_printf(m, " uuid:%pU", mnt->mnt_sb->s_uuid);

/* Filesystem specific data */
seq_puts(m, " - ");
show_type(m, sb);
Expand Down
1 change: 0 additions & 1 deletion include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,6 @@ struct super_block {
wait_queue_head_t s_wait_unfrozen;

char s_id[32]; /* Informational name */
u8 s_uuid[16]; /* UUID */

void *s_fs_info; /* Filesystem private info */
fmode_t s_mode;
Expand Down

0 comments on commit be85bcc

Please sign in to comment.