diff options
author | Mika Kukkonen <mikukkon@miku.homelinux.net> | 2007-07-17 07:04:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 13:23:08 -0400 |
commit | c381bfcf0cd100a37cd969fa0d3aa758e13b5bcc (patch) | |
tree | 84849928c8c11add3d13bf66e1f64a22698181a4 | |
parent | 1269bc69b6649282091bb7007372acf4ab8357fd (diff) |
Couple fixes to fs/ecryptfs/inode.c
Following was uncovered by compiling the kernel with '-W' flag:
CC [M] fs/ecryptfs/inode.o
fs/ecryptfs/inode.c: In function ‘ecryptfs_lookup’:
fs/ecryptfs/inode.c:304: warning: comparison of unsigned expression < 0 is always false
fs/ecryptfs/inode.c: In function ‘ecryptfs_symlink’:
fs/ecryptfs/inode.c:486: warning: comparison of unsigned expression < 0 is always false
Function ecryptfs_encode_filename() can return -ENOMEM, so change the
variables to plain int, as in the first case the only real use actually
expects int, and in latter case there is no use beoynd the error check.
Signed-off-by: Mika Kukkonen <mikukkon@iki.fi>
Cc: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/ecryptfs/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 83e94fedd4e9..e77a2ec71aa5 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c | |||
@@ -282,7 +282,7 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry, | |||
282 | struct dentry *lower_dentry; | 282 | struct dentry *lower_dentry; |
283 | struct vfsmount *lower_mnt; | 283 | struct vfsmount *lower_mnt; |
284 | char *encoded_name; | 284 | char *encoded_name; |
285 | unsigned int encoded_namelen; | 285 | int encoded_namelen; |
286 | struct ecryptfs_crypt_stat *crypt_stat = NULL; | 286 | struct ecryptfs_crypt_stat *crypt_stat = NULL; |
287 | struct ecryptfs_mount_crypt_stat *mount_crypt_stat; | 287 | struct ecryptfs_mount_crypt_stat *mount_crypt_stat; |
288 | char *page_virt = NULL; | 288 | char *page_virt = NULL; |
@@ -473,7 +473,7 @@ static int ecryptfs_symlink(struct inode *dir, struct dentry *dentry, | |||
473 | struct dentry *lower_dir_dentry; | 473 | struct dentry *lower_dir_dentry; |
474 | umode_t mode; | 474 | umode_t mode; |
475 | char *encoded_symname; | 475 | char *encoded_symname; |
476 | unsigned int encoded_symlen; | 476 | int encoded_symlen; |
477 | struct ecryptfs_crypt_stat *crypt_stat = NULL; | 477 | struct ecryptfs_crypt_stat *crypt_stat = NULL; |
478 | 478 | ||
479 | lower_dentry = ecryptfs_dentry_to_lower(dentry); | 479 | lower_dentry = ecryptfs_dentry_to_lower(dentry); |