eCryptfs: Check for O_RDONLY lower inodes when opening lower files
If the lower inode is read-only, don't attempt to open the lower file
read/write and don't hand off the open request to the privileged
eCryptfs kthread for opening it read/write. Instead, only try an
unprivileged, read-only open of the file and give up if that fails.
This patch fixes an oops when eCryptfs is mounted on top of a read-only
mount.
Acked-by: Serge Hallyn <[email protected]>
Cc: Eric Sandeen <[email protected]>
Cc: Dave Kleikamp <[email protected]>
Cc: [email protected]
Cc: stable <[email protected]>
Signed-off-by: Tyler Hicks <[email protected]>