]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: lockf: Make lockf() return ENOLCK when too many locks
authorTakashi Yano <takashi.yano@nifty.ne.jp>
Sat, 19 Oct 2024 16:54:00 +0000 (01:54 +0900)
committerTakashi Yano <takashi.yano@nifty.ne.jp>
Thu, 31 Oct 2024 06:34:45 +0000 (15:34 +0900)
commitae181b0ff1226cf38be8a7f03ff19bf869c87f54
tree7371f76a0074b9bae81a5a4af5f0b8f3605c46e1
parentf9cc21dc001acc2c90cfdb170c4bdd50f76770ea
Cygwin: lockf: Make lockf() return ENOLCK when too many locks

Previously, lockf() printed a warning message when the number of locks
per file exceeds the limit (MAX_LOCKF_CNT). This patch makes lockf()
return ENOLCK in that case rather than printing the warning message.

Addresses: https://cygwin.com/pipermail/cygwin/2024-October/256528.html
Fixes: 31390e4ca643 ("(inode_t::get_all_locks_list): Use pre-allocated buffer in i_all_lf instead of allocating every lock. Return pointer to start of linked list of locks.")
Reported-by: Christian Franke <Christian.Franke@t-online.de>
Reviewed-by: Corinna Vinschen <corinna@vinschen.de>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
winsup/cygwin/flock.cc
winsup/cygwin/release/3.5.5
This page took 0.029734 seconds and 5 git commands to generate.