universal7580: fix commit "ANDROID: sdcardfs: Hold i_mutex for
[GitHub/LineageOS/android_kernel_samsung_universal7580.git] / fs / sdcardfs / file.c
index 33083801f30d890b75f77f951ddf7c4b30145f1f..35b69bdc42d8b0ef2dcfe84d59478424f2df84fb 100644 (file)
@@ -76,8 +76,10 @@ static ssize_t sdcardfs_write(struct file *file, const char __user *buf,
        if (err >= 0) {
                if (sizeof(loff_t) > sizeof(long))
                        mutex_lock(&inode->i_mutex);
-               fsstack_copy_inode_size(inode, file_inode(lower_file));
-               fsstack_copy_attr_times(inode, file_inode(lower_file));
+               fsstack_copy_inode_size(inode,
+                               lower_file->f_path.dentry->d_inode);
+               fsstack_copy_attr_times(inode,
+                               lower_file->f_path.dentry->d_inode);
                if (sizeof(loff_t) > sizeof(long))
                        mutex_unlock(&inode->i_mutex);
        }