ecryptfs: fixed testing of file descriptor flags
authorRoberto Sassu <roberto.sassu@polito.it>
Wed, 3 Nov 2010 10:11:34 +0000 (11:11 +0100)
committerTyler Hicks <tyhicks@linux.vnet.ibm.com>
Mon, 17 Jan 2011 17:24:43 +0000 (11:24 -0600)
commit0abe1169470571c473ee720c35fe5b3481c46c46
tree3261e72681db07a04a56f31af0edb536b9b7a5e2
parent27992890b02d340198a3a22fc210d13684a41564
ecryptfs: fixed testing of file descriptor flags

This patch replaces the check (lower_file->f_flags & O_RDONLY) with
((lower_file & O_ACCMODE) == O_RDONLY).

Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
fs/ecryptfs/file.c