diff options
author | Richard Weinberger <richard@nod.at> | 2015-03-04 22:39:48 +0100 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2015-03-26 23:27:52 +0100 |
commit | a9d1958b4b9a688becceda44938baac99a62fbd7 (patch) | |
tree | 33cfa12dcf5033b16ad5c5cf92ee9ad855a2fa7c /fs/hostfs/hostfs_kern.c | |
parent | 112a5da717f86250bc6be2c63e7af174be7c5507 (diff) | |
download | linux-rt-a9d1958b4b9a688becceda44938baac99a62fbd7.tar.gz |
hostfs: hostfs_open: Reset open flags upon each retry
...otherwise we might end up with an incorrect mode mode.
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/hostfs/hostfs_kern.c')
-rw-r--r-- | fs/hostfs/hostfs_kern.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 8bbceae5ed03..80ced3dc84ae 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -315,6 +315,8 @@ static int hostfs_open(struct inode *ino, struct file *file) mode |= HOSTFS_I(ino)->mode; retry: + r = w = 0; + if (mode & FMODE_READ) r = 1; if (mode & FMODE_WRITE) |