Bugzilla – Attachment 48869 Details for
Bug 114875
Subfs mount points have wrong st_dev
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
cache the dev from the sub-filesystem
subfs-cache-dev.diff (text/plain), 2.14 KB, created by
Jeff Mahoney
on 2005-09-06 03:13:45 UTC
(
hide
)
Description:
cache the dev from the sub-filesystem
Filename:
MIME Type:
Creator:
Jeff Mahoney
Created:
2005-09-06 03:13:45 UTC
Size:
2.14 KB
patch
obsolete
>diff -ruNpX dontdiff linux-2.6.13/fs/subfs/subfs.c linux-2.6.13.fixed/fs/subfs/subfs.c >--- linux-2.6.13/fs/subfs/subfs.c 2005-09-05 23:58:22.000000000 -0400 >+++ linux-2.6.13.fixed/fs/subfs/subfs.c 2005-09-06 00:09:42.000000000 -0400 >@@ -43,8 +43,19 @@ struct subfs_mount { > struct super_block *sb; > struct semaphore sem; > int procuid; >+ dev_t dev; > }; > >+ >+static int subfs_getattr(struct vfsmount *mnt, struct dentry *dentry, >+ struct kstat *stat) >+{ >+ struct subfs_mount *sfs_mnt = mnt->mnt_sb->s_fs_info; >+ generic_fillattr(dentry->d_inode, stat); >+ stat->dev = sfs_mnt->dev; >+ return 0; >+} >+ > /* Same as set_fs_pwd from namespace.c. There's a problem with the > * symbol. When it is fixed, discard this. > * Replace the fs->{pwdmnt,pwd} with {mnt,dentry}. Put the old values. >@@ -161,6 +172,7 @@ static struct vfsmount *get_child_mount > /* We're sitting in a detached namespace - > * don't mount the filesystem. */ > if (mnt->mnt_mountpoint == mnt->mnt_root) { >+ sfs_mnt->dev = sfs_mnt->sb->s_dev; > printk (KERN_ERR "subfs: refusing to mount media in " > "deleted directory\n"); > return ERR_PTR(-ENOENT); >@@ -179,6 +191,8 @@ static struct vfsmount *get_child_mount > printk (KERN_ERR "subfs: unsuccessful attempt to " > "mount media (%d)\n", result); > /* Workaround for call_usermodehelper return value bug. */ >+ >+ sfs_mnt->dev = sfs_mnt->sb->s_dev; > if (result < 0) > return ERR_PTR(result); > return ERR_PTR(-ENOMEDIUM); >@@ -191,8 +205,11 @@ static struct vfsmount *get_child_mount > */ > if (!child) { > subfs_send_signal(); >+ sfs_mnt->dev = sfs_mnt->sb->s_dev; > return ERR_PTR(-ERESTARTSYS); > } >+ >+ sfs_mnt->dev = child->mnt_sb->s_dev; > } > > return child; >@@ -289,6 +306,7 @@ static struct super_operations subfs_s_o > > static struct inode_operations subfs_dir_inode_operations = { > .lookup = subfs_lookup, >+ .getattr = subfs_getattr, > }; > > >@@ -444,6 +462,7 @@ static struct super_block *subfs_get_sup > return ERR_PTR(ret); > newmount->sb = get_sb_nodev(fst, flags, data, subfs_fill_super); > newmount->sb->s_fs_info = newmount; >+ newmount->dev = newmount->sb->s_dev; > return newmount->sb; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 114875
: 48869 |
48974