Skip to content

Commit

Permalink
um: fix ubd_file_size for read-only files
Browse files Browse the repository at this point in the history
Made ubd_file_size not request write access. Fixes use of read-only images.

Signed-off-by: Martin Pärtel <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
  • Loading branch information
mpartel authored and richardweinberger committed Aug 1, 2012
1 parent b8a4209 commit d4afcba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/um/drivers/ubd_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ static inline int ubd_file_size(struct ubd *ubd_dev, __u64 *size_out)
goto out;
}

fd = os_open_file(ubd_dev->file, global_openflags, 0);
fd = os_open_file(ubd_dev->file, of_read(OPENFLAGS()), 0);
if (fd < 0)
return fd;

Expand Down

0 comments on commit d4afcba

Please sign in to comment.