aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs
diff options
context:
space:
mode:
authorDmitriy Monakhov <dmonakhov@sw.ru>2007-03-05 03:30:12 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-05 10:57:50 -0500
commitad5f1196792653dadf09c07a5fa917092b469c1c (patch)
tree7cf4afe8a81bb55830e8dbfdf97731f1c2e44106 /fs/ecryptfs
parent58e0543e8f355b32f0778a18858b255adb7402ae (diff)
[PATCH] ecryptfs: check xattr operation support fix
- ecryptfs_write_inode_size_to_metadata() error code was ignored. - i_op->setxattr() must be supported by lower fs because used below. Signed-off-by: Monakhov Dmitriy <dmonakhov@openvz.org> Acked-by: Michael Halcrow <mhalcrow@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ecryptfs')
-rw-r--r--fs/ecryptfs/inode.c6
-rw-r--r--fs/ecryptfs/mmap.c3
2 files changed, 5 insertions, 4 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index 0cfff4fefa9..e62f3fc7241 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -168,9 +168,9 @@ static int grow_file(struct dentry *ecryptfs_dentry, struct file *lower_file,
168 goto out; 168 goto out;
169 } 169 }
170 i_size_write(inode, 0); 170 i_size_write(inode, 0);
171 ecryptfs_write_inode_size_to_metadata(lower_file, lower_inode, inode, 171 rc = ecryptfs_write_inode_size_to_metadata(lower_file, lower_inode,
172 ecryptfs_dentry, 172 inode, ecryptfs_dentry,
173 ECRYPTFS_LOWER_I_MUTEX_NOT_HELD); 173 ECRYPTFS_LOWER_I_MUTEX_NOT_HELD);
174 ecryptfs_inode_to_private(inode)->crypt_stat.flags |= ECRYPTFS_NEW_FILE; 174 ecryptfs_inode_to_private(inode)->crypt_stat.flags |= ECRYPTFS_NEW_FILE;
175out: 175out:
176 return rc; 176 return rc;
diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c
index 7be8e91b5ba..7def4be83e6 100644
--- a/fs/ecryptfs/mmap.c
+++ b/fs/ecryptfs/mmap.c
@@ -502,7 +502,8 @@ static int ecryptfs_write_inode_size_to_xattr(struct inode *lower_inode,
502 goto out; 502 goto out;
503 } 503 }
504 lower_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry); 504 lower_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry);
505 if (!lower_dentry->d_inode->i_op->getxattr) { 505 if (!lower_dentry->d_inode->i_op->getxattr ||
506 !lower_dentry->d_inode->i_op->setxattr) {
506 printk(KERN_WARNING 507 printk(KERN_WARNING
507 "No support for setting xattr in lower filesystem\n"); 508 "No support for setting xattr in lower filesystem\n");
508 rc = -ENOSYS; 509 rc = -ENOSYS;