summaryrefslogtreecommitdiffstats
path: root/fs/ext4/file.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-01-24 02:10:29 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2010-03-03 20:07:54 +0100
commit3899167dbd6832a3d8d7171b425257ad46b6c40c (patch)
tree2a3bc9562e061c03c444e4ab1d5df2a3d9e15680 /fs/ext4/file.c
parentSanitize autofs_dev_ioctl_ismountpoint() (diff)
downloadlinux-3899167dbd6832a3d8d7171b425257ad46b6c40c.tar.xz
linux-3899167dbd6832a3d8d7171b425257ad46b6c40c.zip
Get rid of mnt_mountpoint abuses in ext4
path to mnt/mnt->mnt_root is no worse than that to mnt->mnt_parent/mnt->mnt_mountpoint *and* needs no pinning the sucker down (mnt is not going away and mnt->mnt_root won't change) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ext4/file.c')
-rw-r--r--fs/ext4/file.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 9630583cef28..56eee3d796c2 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -116,11 +116,9 @@ static int ext4_file_open(struct inode * inode, struct file * filp)
* devices or filesystem images.
*/
memset(buf, 0, sizeof(buf));
- path.mnt = mnt->mnt_parent;
- path.dentry = mnt->mnt_mountpoint;
- path_get(&path);
+ path.mnt = mnt;
+ path.dentry = mnt->mnt_root;
cp = d_path(&path, buf, sizeof(buf));
- path_put(&path);
if (!IS_ERR(cp)) {
memcpy(sbi->s_es->s_last_mounted, cp,
sizeof(sbi->s_es->s_last_mounted));