All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Handle OFD lock flags
@ 2020-07-20  8:37 Stefan Agner
  2020-07-20  9:02 ` ✗ patchtest: failure for Handle OFD lock flags (rev2) Patchwork
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Agner @ 2020-07-20  8:37 UTC (permalink / raw)
  To: openembedded-core, seebs; +Cc: ross.burton, stefan

Linux 3.15 and newer introduced new open file description locks.
Currently pseudo prints a warning if fcntl is used with OFD locks:
  unknown fcntl argument 37, assuming long argument.

However, calls to fcntl with a OFC lock set need a struct flock
pointer. Treat F_OFD_GETLK (and friends) like F_GETLK (and friends).

This issue has been observed with ostree. Comparing strace output
between two runs with/without this patch shows the same fcntl calls,
hence it seems not to matter in practice.

Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 ports/linux/guts/fcntl.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ports/linux/guts/fcntl.c b/ports/linux/guts/fcntl.c
index 4dd9796..434c7f3 100644
--- a/ports/linux/guts/fcntl.c
+++ b/ports/linux/guts/fcntl.c
@@ -52,6 +52,11 @@
 	case F_GETLK:
 	case F_SETLK:
 	case F_SETLKW:
+#ifdef F_OFD_GETLK
+	case F_OFD_GETLK:
+	case F_OFD_SETLK:
+	case F_OFD_SETLKW:
+#endif
 		rc = real_fcntl(fd, cmd, lock);
 		break;
 #if defined(F_GETLK64) && (F_GETLK64 != F_GETLK)
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-20  9:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-20  8:37 [PATCH v2] Handle OFD lock flags Stefan Agner
2020-07-20  9:02 ` ✗ patchtest: failure for Handle OFD lock flags (rev2) Patchwork
2020-07-20  9:04   ` Stefan Agner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.