Commit af955658 authored by Richard Weinberger's avatar Richard Weinberger

hostfs: hostfs_file_open: Fix a fd leak in hostfs_file_open

In case of a race between to callers of hostfs_file_open()
it can happen that a file describtor is leaked.
Signed-off-by: default avatarRichard Weinberger <>
parent 69886e67
......@@ -329,6 +329,7 @@ static int hostfs_file_open(struct inode *ino, struct file *file)
/* somebody else had handled it first? */
if ((mode & HOSTFS_I(ino)->mode) == mode) {
return 0;
if ((mode | HOSTFS_I(ino)->mode) != mode) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment