reiserfs: Don't call reiserfs_get_acl() with the reiserfs lock
[safe/jmp/linux-2.6] / fs / ecryptfs / inode.c
index 1940edd..056fed6 100644 (file)
@@ -476,6 +476,7 @@ static int ecryptfs_unlink(struct inode *dir, struct dentry *dentry)
        struct inode *lower_dir_inode = ecryptfs_inode_to_lower(dir);
        struct dentry *lower_dir_dentry;
 
+       dget(lower_dentry);
        lower_dir_dentry = lock_parent(lower_dentry);
        rc = vfs_unlink(lower_dir_inode, lower_dentry);
        if (rc) {
@@ -489,6 +490,7 @@ static int ecryptfs_unlink(struct inode *dir, struct dentry *dentry)
        d_drop(dentry);
 out_unlock:
        unlock_dir(lower_dir_dentry);
+       dput(lower_dentry);
        return rc;
 }
 
@@ -690,7 +692,7 @@ ecryptfs_readlink(struct dentry *dentry, char __user *buf, int bufsiz)
                }
                /* Check for bufsiz <= 0 done in sys_readlinkat() */
                rc = copy_to_user(buf, plaintext_name,
-                                 min((unsigned) bufsiz, plaintext_name_size));
+                                 min((size_t) bufsiz, plaintext_name_size));
                if (rc)
                        rc = -EFAULT;
                else