eCryptfs: Handle ioctl calls with unlocked and compat functions
commit3dc47cf2aa0ce318160c81e24b27cf3afea6decd
authorTyler Hicks <tyhicks@linux.vnet.ibm.com>
Tue, 3 Nov 2009 17:45:11 +0000 (3 11:45 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Aug 2010 20:19:37 +0000 (13 13:19 -0700)
tree0e67420f6407a92af0f6f801518fa1ad9e04cf74
parentd8d83cbed1b90c46e20b7864449ccb78edfaa8d1
eCryptfs: Handle ioctl calls with unlocked and compat functions

commit c43f7b8fb03be8bcc579bfc4e6ab70eac887ab55 upstream.

Lower filesystems that only implemented unlocked_ioctl weren't being
passed ioctl calls because eCryptfs only checked for
lower_file->f_op->ioctl and returned -ENOTTY if it was NULL.

eCryptfs shouldn't implement ioctl(), since it doesn't require the BKL.
This patch introduces ecryptfs_unlocked_ioctl() and
ecryptfs_compat_ioctl(), which passes the calls on to the lower file
system.

https://bugs.launchpad.net/ecryptfs/+bug/469664

Reported-by: James Dupin <james.dupin@gmail.com>
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ecryptfs/file.c