Skip to content

Commit

Permalink
diskq: open the dirlock file in read-write mode
Browse files Browse the repository at this point in the history
In case of NFS, flock() is emulated via fcntl() locks that only works in
case we have write access as well.

Reported-by: Arpad Kunszt
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
  • Loading branch information
bazsi committed May 24, 2024
1 parent 02486f3 commit cbd31a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/diskq/qdisk.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ _grab_dirlock(const gchar *dir, gint *fd)

g_mutex_lock(&filename_lock);

*fd = open(dirlock_file_path, O_RDONLY | O_CREAT, 0600);
*fd = open(dirlock_file_path, O_RDWR | O_CREAT, 0600);
if (*fd < 0)
{
msg_error("Failed to open disk-buffer dirlock file",
Expand Down

0 comments on commit cbd31a8

Please sign in to comment.