• Mika Kukkonen's avatar
    Couple fixes to fs/ecryptfs/inode.c · c381bfcf
    Mika Kukkonen authored
    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: default avatarMika Kukkonen <mikukkon@iki.fi>
    Cc: Michael Halcrow <mhalcrow@us.ibm.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    c381bfcf
inode.c 31.8 KB