OSDN Git Service

Merge tag 'v4.4.214' into 10
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / fs / namei.c
index f248c3c..e221fed 100644 (file)
@@ -3183,8 +3183,8 @@ static int do_last(struct nameidata *nd,
                   int *opened)
 {
        struct dentry *dir = nd->path.dentry;
-       kuid_t dir_uid = dir->d_inode->i_uid;
-       umode_t dir_mode = dir->d_inode->i_mode;
+       kuid_t dir_uid = nd->inode->i_uid;
+       umode_t dir_mode = nd->inode->i_mode;
        int open_flag = op->open_flag;
        bool will_truncate = (open_flag & O_TRUNC) != 0;
        bool got_write = false;