Skip to content

Commit

Permalink
hostfs: hostfs_open: Reset open flags upon each retry
Browse files Browse the repository at this point in the history
...otherwise we might end up with an incorrect mode mode.

Signed-off-by: Richard Weinberger <richard@nod.at>
  • Loading branch information
Richard Weinberger committed Mar 26, 2015
1 parent 112a5da commit a9d1958
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/hostfs/hostfs_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a9d1958

Please sign in to comment.