android_kernel_oneplus_msm8998/fs/ecryptfs
Al Viro 4804692cb1 UPSTREAM: ecryptfs: fix handling of directory opening
(cherry picked from commit 6a480a7842545ec520a91730209ec0bae41694c1)

First of all, trying to open them r/w is idiocy; it's guaranteed to fail.
Moreover, assigning ->f_pos and assuming that everything will work is
blatantly broken - try that with e.g. tmpfs as underlying layer and watch
the fireworks.  There may be a non-trivial amount of state associated with
current IO position, well beyond the numeric offset.  Using the single
struct file associated with underlying inode is really not a good idea;
we ought to open one for each ecryptfs directory struct file.

Additionally, file_operations both for directories and non-directories are
full of pointless methods; non-directories should *not* have ->iterate(),
directories should not have ->flush(), ->fasync() and ->splice_read().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Change-Id: I4813ce803f270fdd364758ce1dc108b76eab226e
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2016-08-12 13:44:30 -07:00
..
crypto.c eCryptfs: Delete a check before the function call "key_put" 2015-08-18 17:29:49 -05:00
debug.c
dentry.c eCryptfs: Invalidate dcache entries when lower i_nlink is zero 2015-08-18 17:29:48 -05:00
ecryptfs_kernel.h KEYS: Merge the type-specific data with the payload data 2015-10-21 15:18:36 +01:00
file.c UPSTREAM: ecryptfs: fix handling of directory opening 2016-08-12 13:44:30 -07:00
inode.c fs: Drop unlikely before IS_ERR(_OR_NULL) 2015-09-29 15:13:58 +02:00
Kconfig
keystore.c eCryptfs: ensure copy to crypt_stat->cipher does not overrun 2015-02-24 19:23:28 -06:00
kthread.c UPSTREAM: Revert "ecryptfs: forbid opening files without mmap handler" 2016-08-12 13:44:01 -07:00
main.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
Makefile
messaging.c
miscdev.c
mmap.c treewide: Fix typo in printk 2015-08-07 13:58:05 +02:00
read_write.c
super.c