Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Branch b1_4
[fs/lustre-release.git]
/
libsysio
/
src
/
rw.c
diff --git
a/libsysio/src/rw.c
b/libsysio/src/rw.c
index
e482379
..
328f076
100644
(file)
--- a/
libsysio/src/rw.c
+++ b/
libsysio/src/rw.c
@@
-105,9
+105,7
@@
_sysio_iiox(int (*f)(struct inode *, struct ioctx *),
/*
* Check that it was opened with flags supporting the operation.
*/
- if (!(wr
- ? (fil->f_flags & (O_RDWR | O_WRONLY))
- : !(fil->f_flags & O_WRONLY)))
+ if (!F_CHKRW(fil, wr ? 'w' : 'r'))
return -EBADF;
ino = fil->f_ino;