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

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
..
2015-06-30 19:44:57 -07:00
2015-06-23 18:02:01 -04:00
2015-06-25 17:00:42 -07:00
2015-11-13 20:34:33 -05:00
2015-11-23 21:11:08 -05:00
2015-11-16 23:54:45 -08:00
2016-03-24 10:32:35 -07:00
2015-11-11 02:18:27 -05:00
2015-08-12 15:28:45 -05:00
2015-11-13 20:34:33 -05:00