diff --git a/[refs] b/[refs] index 30081772dbfa..747ede4d189e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2f1936b87783a3a56c9441b27b9ba7a747f11e8e +refs/heads/master: 7e79eedb3b22200cc8b774baea3a7bf28d766101 diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index 46af98ed136b..3b67be7631dc 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -2524,19 +2524,19 @@ int vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_de return -EPERM; if (!dir->i_op || !dir->i_op->link) return -EPERM; - if (S_ISDIR(old_dentry->d_inode->i_mode)) + if (S_ISDIR(inode->i_mode)) return -EPERM; error = security_inode_link(old_dentry, dir, new_dentry); if (error) return error; - mutex_lock(&old_dentry->d_inode->i_mutex); + mutex_lock(&inode->i_mutex); DQUOT_INIT(dir); error = dir->i_op->link(old_dentry, dir, new_dentry); - mutex_unlock(&old_dentry->d_inode->i_mutex); + mutex_unlock(&inode->i_mutex); if (!error) - fsnotify_link(dir, old_dentry->d_inode, new_dentry); + fsnotify_link(dir, inode, new_dentry); return error; }