diff options
| author | Richard Weinberger <richard@nod.at> | 2015-03-04 16:39:48 -0500 |
|---|---|---|
| committer | Richard Weinberger <richard@nod.at> | 2015-03-26 18:27:52 -0400 |
| commit | a9d1958b4b9a688becceda44938baac99a62fbd7 (patch) | |
| tree | 33cfa12dcf5033b16ad5c5cf92ee9ad855a2fa7c /fs/hostfs | |
| parent | 112a5da717f86250bc6be2c63e7af174be7c5507 (diff) | |
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')
| -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) | |||
| 315 | mode |= HOSTFS_I(ino)->mode; | 315 | mode |= HOSTFS_I(ino)->mode; |
| 316 | 316 | ||
| 317 | retry: | 317 | retry: |
| 318 | r = w = 0; | ||
| 319 | |||
| 318 | if (mode & FMODE_READ) | 320 | if (mode & FMODE_READ) |
| 319 | r = 1; | 321 | r = 1; |
| 320 | if (mode & FMODE_WRITE) | 322 | if (mode & FMODE_WRITE) |
