aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/file.c
diff options
context:
space:
mode:
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)
116 * devices or filesystem images. 116 * devices or filesystem images.
117 */ 117 */
118 memset(buf, 0, sizeof(buf)); 118 memset(buf, 0, sizeof(buf));
119 path.mnt = mnt->mnt_parent; 119 path.mnt = mnt;
120 path.dentry = mnt->mnt_mountpoint; 120 path.dentry = mnt->mnt_root;
121 path_get(&path);
122 cp = d_path(&path, buf, sizeof(buf)); 121 cp = d_path(&path, buf, sizeof(buf));
123 path_put(&path);
124 if (!IS_ERR(cp)) { 122 if (!IS_ERR(cp)) {
125 memcpy(sbi->s_es->s_last_mounted, cp, 123 memcpy(sbi->s_es->s_last_mounted, cp,
126 sizeof(sbi->s_es->s_last_mounted)); 124 sizeof(sbi->s_es->s_last_mounted));