The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [BUG] ECRYPT_FS
@ 2011-01-13 20:23 Eric Dumazet
  2011-01-13 20:46 ` Christoph Hellwig
  2011-01-13 22:16 ` Al Viro
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2011-01-13 20:23 UTC (permalink / raw)
  To: Al Viro; +Cc: linux-kernel

Hi Al

FYI, current linux-2.6 is broken for CONFIG_ECRYPT_FS

commit 66cb76666d69502fe982990b2cff5b6d607fd3b1
Author: Al Viro <viro@zeniv.linux.org.uk>
Date:   Wed Jan 12 20:04:37 2011 -0500

  CC      fs/ecryptfs/main.o
fs/ecryptfs/main.c:144: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
fs/ecryptfs/main.c: In function ‘ecryptfs_interpose’:
fs/ecryptfs/main.c:204: error: implicit declaration of function ‘ecryptfs_get_inode’
fs/ecryptfs/main.c:204: warning: initialization makes pointer from integer without a cast
fs/ecryptfs/main.c:206: error: expected ‘)’ before ‘return’
fs/ecryptfs/main.c:212: error: expected expression before ‘}’ token
fs/ecryptfs/main.c: In function ‘ecryptfs_mount’:
fs/ecryptfs/main.c:569: warning: assignment makes pointer from integer without a cast



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] ECRYPT_FS
  2011-01-13 20:23 [BUG] ECRYPT_FS Eric Dumazet
@ 2011-01-13 20:46 ` Christoph Hellwig
  2011-01-13 22:16 ` Al Viro
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2011-01-13 20:46 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: Al Viro, linux-kernel

On Thu, Jan 13, 2011 at 09:23:01PM +0100, Eric Dumazet wrote:
> Hi Al
> 
> FYI, current linux-2.6 is broken for CONFIG_ECRYPT_FS

The patch below fixes it:

Index: linux-2.6/fs/ecryptfs/main.c
===================================================================
--- linux-2.6.orig/fs/ecryptfs/main.c	2011-01-13 21:35:02.742004281 +0100
+++ linux-2.6/fs/ecryptfs/main.c	2011-01-13 21:42:05.032254595 +0100
@@ -141,13 +141,12 @@ int ecryptfs_init_persistent_file(struct
 	return rc;
 }
 
-static inode *ecryptfs_get_inode(struct inode *lower_inode,
+static struct inode *ecryptfs_get_inode(struct inode *lower_inode,
 		       struct super_block *sb)
 {
 	struct inode *inode;
 	int rc = 0;
 
-	lower_inode = lower_dentry->d_inode;
 	if (lower_inode->i_sb != ecryptfs_superblock_to_lower(sb)) {
 		rc = -EXDEV;
 		goto out;
@@ -202,7 +201,8 @@ int ecryptfs_interpose(struct dentry *lo
 {
 	struct inode *lower_inode = lower_dentry->d_inode;
 	struct inode *inode = ecryptfs_get_inode(lower_inode, sb);
-	if (IS_ERR(inode)
+
+	if (IS_ERR(inode))
 		return PTR_ERR(inode);
 	if (flags & ECRYPTFS_INTERPOSE_FLAG_D_ADD)
 		d_add(dentry, inode);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] ECRYPT_FS
  2011-01-13 20:23 [BUG] ECRYPT_FS Eric Dumazet
  2011-01-13 20:46 ` Christoph Hellwig
@ 2011-01-13 22:16 ` Al Viro
  1 sibling, 0 replies; 3+ messages in thread
From: Al Viro @ 2011-01-13 22:16 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: linux-kernel, Linus Torvalds

On Thu, Jan 13, 2011 at 09:23:01PM +0100, Eric Dumazet wrote:
> Hi Al
> 
> FYI, current linux-2.6 is broken for CONFIG_ECRYPT_FS
> 
> commit 66cb76666d69502fe982990b2cff5b6d607fd3b1
> Author: Al Viro <viro@zeniv.linux.org.uk>
> Date:   Wed Jan 12 20:04:37 2011 -0500

Ugh...  Unfolded compile fix lost in branch reordering.  My apologies ;-/

From: Al Viro <viro@zeniv.linux.org.uk>
Date: Wed, 12 Jan 2011 20:32:19 -0500
Subject: foldme

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 fs/ecryptfs/main.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c
index 9ed4769..d3b28ab 100644
--- a/fs/ecryptfs/main.c
+++ b/fs/ecryptfs/main.c
@@ -141,13 +141,12 @@ int ecryptfs_init_persistent_file(struct dentry *ecryptfs_dentry)
 	return rc;
 }
 
-static inode *ecryptfs_get_inode(struct inode *lower_inode,
+static struct inode *ecryptfs_get_inode(struct inode *lower_inode,
 		       struct super_block *sb)
 {
 	struct inode *inode;
 	int rc = 0;
 
-	lower_inode = lower_dentry->d_inode;
 	if (lower_inode->i_sb != ecryptfs_superblock_to_lower(sb)) {
 		rc = -EXDEV;
 		goto out;
@@ -202,7 +201,7 @@ int ecryptfs_interpose(struct dentry *lower_dentry, struct dentry *dentry,
 {
 	struct inode *lower_inode = lower_dentry->d_inode;
 	struct inode *inode = ecryptfs_get_inode(lower_inode, sb);
-	if (IS_ERR(inode)
+	if (IS_ERR(inode))
 		return PTR_ERR(inode);
 	if (flags & ECRYPTFS_INTERPOSE_FLAG_D_ADD)
 		d_add(dentry, inode);


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-13 22:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-13 20:23 [BUG] ECRYPT_FS Eric Dumazet
2011-01-13 20:46 ` Christoph Hellwig
2011-01-13 22:16 ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox