]> git.baikalelectronics.ru Git - kernel.git/commit
fs/locks: fix fcntl_getlk64/fcntl_setlk64 stub prototypes
authorArnd Bergmann <arnd@arndb.de>
Tue, 23 Nov 2021 16:05:07 +0000 (17:05 +0100)
committerChuck Lever <chuck.lever@oracle.com>
Sun, 9 Jan 2022 18:23:00 +0000 (13:23 -0500)
commit024f094288956ae080ba45e2ffdcb00b1c21f886
tree8237e58e2c0707d9fe00df1c09761be7ae56822e
parent30b9a86bf7d5a39b4ed3801c9c9ecd90cba9596b
fs/locks: fix fcntl_getlk64/fcntl_setlk64 stub prototypes

My patch to rework oabi fcntl64() introduced a harmless
sparse warning when file locking is disabled:

   arch/arm/kernel/sys_oabi-compat.c:251:51: sparse: sparse: incorrect type in argument 3 (different address spaces) @@     expected struct flock64 [noderef] __user *user @@     got struct flock64 * @@
   arch/arm/kernel/sys_oabi-compat.c:251:51: sparse:     expected struct flock64 [noderef] __user *user
   arch/arm/kernel/sys_oabi-compat.c:251:51: sparse:     got struct flock64 *
   arch/arm/kernel/sys_oabi-compat.c:265:55: sparse: sparse: incorrect type in argument 4 (different address spaces) @@     expected struct flock64 [noderef] __user *user @@     got struct flock64 * @@
   arch/arm/kernel/sys_oabi-compat.c:265:55: sparse:     expected struct flock64 [noderef] __user *user
   arch/arm/kernel/sys_oabi-compat.c:265:55: sparse:     got struct flock64 *

When file locking is enabled, everything works correctly and the
right data gets passed, but the stub declarations in linux/fs.h
did not get modified when the calling conventions changed in an
earlier patch.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 928fb296d077 ("ARM: 9111/1: oabi-compat: rework fcntl64() emulation")
Fixes: 10cf20b4a1ed ("fs/locks: pass kernel struct flock to fcntl_getlk/setlk")
Cc: Christoph Hellwig <hch@lst.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
include/linux/fs.h