basic modification from way back
[powerpc.git] / fs / namespace.c
index be5e56b..b696e3a 100644 (file)
@@ -377,6 +377,10 @@ static int show_vfsmnt(struct seq_file *m, void *v)
        seq_path(m, mnt, mnt->mnt_root, " \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]) {
+               seq_putc(m, '.');
+               mangle(m, mnt->mnt_sb->s_subtype);
+       }
        seq_puts(m, mnt->mnt_sb->s_flags & MS_RDONLY ? " ro" : " rw");
        for (fs_infop = fs_info; fs_infop->flag; fs_infop++) {
                if (mnt->mnt_sb->s_flags & fs_infop->flag)
@@ -495,7 +499,7 @@ void release_mounts(struct list_head *head)
 {
        struct vfsmount *mnt;
        while (!list_empty(head)) {
-               mnt = list_entry(head->next, struct vfsmount, mnt_hash);
+               mnt = list_first_entry(head, struct vfsmount, mnt_hash);
                list_del_init(&mnt->mnt_hash);
                if (mnt->mnt_parent != mnt) {
                        struct dentry *dentry;
@@ -882,6 +886,9 @@ static int do_change_type(struct nameidata *nd, int flag)
        int recurse = flag & MS_REC;
        int type = flag & ~MS_REC;
 
+       if (!capable(CAP_SYS_ADMIN))
+               return -EPERM;
+
        if (nd->dentry != nd->mnt->mnt_root)
                return -EINVAL;
 
@@ -1173,7 +1180,7 @@ static void expire_mount_list(struct list_head *graveyard, struct list_head *mou
 
        while (!list_empty(graveyard)) {
                LIST_HEAD(umounts);
-               mnt = list_entry(graveyard->next, struct vfsmount, mnt_expire);
+               mnt = list_first_entry(graveyard, struct vfsmount, mnt_expire);
                list_del_init(&mnt->mnt_expire);
 
                /* don't do anything if the namespace is dead - all the