#endif
struct list_head mnt_mounts; /* list of children, anchored here */
struct list_head mnt_child; /* and going through their mnt_child */
- /* yet to be moved - up to mnt_devname */
+ /* yet to be moved - fsnotify ones go here */
+ const char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */
struct list_head mnt_list;
struct list_head mnt_expire; /* link in fs-specific expiry list */
struct list_head mnt_share; /* circular list of shared mounts */
goto out_free_cache;
if (name) {
- mnt->mnt_devname = kstrdup(name, GFP_KERNEL);
- if (!mnt->mnt_devname)
+ p->mnt_devname = kstrdup(name, GFP_KERNEL);
+ if (!p->mnt_devname)
goto out_free_id;
}
#ifdef CONFIG_SMP
out_free_devname:
- kfree(p->mnt.mnt_devname);
+ kfree(p->mnt_devname);
#endif
out_free_id:
mnt_free_id(p);
static void free_vfsmnt(struct mount *mnt)
{
- kfree(mnt->mnt.mnt_devname);
+ kfree(mnt->mnt_devname);
mnt_free_id(mnt);
#ifdef CONFIG_SMP
free_percpu(mnt->mnt_pcp);
int flag)
{
struct super_block *sb = old->mnt.mnt_sb;
- struct mount *mnt = alloc_vfsmnt(old->mnt.mnt_devname);
+ struct mount *mnt = alloc_vfsmnt(old->mnt_devname);
if (mnt) {
if (flag & (CL_SLAVE | CL_PRIVATE))
if (err)
goto out;
} else {
- mangle(m, mnt->mnt_devname ? mnt->mnt_devname : "none");
+ mangle(m, r->mnt_devname ? r->mnt_devname : "none");
}
seq_putc(m, ' ');
seq_path(m, &mnt_path, " \t\n\\");
if (sb->s_op->show_devname)
err = sb->s_op->show_devname(m, mnt);
else
- mangle(m, mnt->mnt_devname ? mnt->mnt_devname : "none");
+ mangle(m, r->mnt_devname ? r->mnt_devname : "none");
if (err)
goto out;
seq_puts(m, sb->s_flags & MS_RDONLY ? " ro" : " rw");
seq_puts(m, "device ");
err = mnt->mnt_sb->s_op->show_devname(m, mnt);
} else {
- if (mnt->mnt_devname) {
+ if (r->mnt_devname) {
seq_puts(m, "device ");
- mangle(m, mnt->mnt_devname);
+ mangle(m, r->mnt_devname);
} else
seq_puts(m, "no device");
}