Skip to content

Commit b0da6d4

Browse files
James Hoganarndb
authored andcommitted
asm-generic: Drop renameat syscall from default list
The newer renameat2 syscall provides all the functionality provided by the renameat syscall and adds flags, so future architectures won't need to include renameat. Therefore drop the renameat syscall from the generic syscall list unless __ARCH_WANT_RENAMEAT is defined by the architecture's unistd.h prior to including asm-generic/unistd.h, and adjust all architectures using the generic syscall list to define it so that no in-tree architectures are affected. Signed-off-by: James Hogan <[email protected]> Acked-by: Vineet Gupta <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Cc: [email protected] Cc: Mark Salter <[email protected]> Cc: Aurelien Jacquiot <[email protected]> Cc: [email protected] Cc: Richard Kuo <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Jonas Bonn <[email protected]> Cc: [email protected] Cc: Chen Liqin <[email protected]> Cc: Lennox Wu <[email protected]> Cc: Chris Metcalf <[email protected]> Cc: Guan Xuetao <[email protected]> Cc: Ley Foon Tan <[email protected]> Cc: [email protected] Cc: Yoshinori Sato <[email protected]> Cc: [email protected] Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 1f93e9f commit b0da6d4

File tree

12 files changed

+20
-0
lines changed

12 files changed

+20
-0
lines changed

arch/arc/include/uapi/asm/unistd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#if !defined(_UAPI_ASM_ARC_UNISTD_H) || defined(__SYSCALL)
1616
#define _UAPI_ASM_ARC_UNISTD_H
1717

18+
#define __ARCH_WANT_RENAMEAT
1819
#define __ARCH_WANT_SYS_EXECVE
1920
#define __ARCH_WANT_SYS_CLONE
2021
#define __ARCH_WANT_SYS_VFORK

arch/arm64/include/uapi/asm/unistd.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@
1313
* You should have received a copy of the GNU General Public License
1414
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1515
*/
16+
17+
#define __ARCH_WANT_RENAMEAT
18+
1619
#include <asm-generic/unistd.h>

arch/c6x/include/uapi/asm/unistd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* more details.
1515
*/
1616

17+
#define __ARCH_WANT_RENAMEAT
1718
#define __ARCH_WANT_SYS_CLONE
1819

1920
/* Use the standard ABI for syscalls. */

arch/h8300/include/uapi/asm/unistd.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
#define __ARCH_NOMMU
22

3+
#define __ARCH_WANT_RENAMEAT
4+
35
#include <asm-generic/unistd.h>

arch/hexagon/include/uapi/asm/unistd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
*/
2828

2929
#define sys_mmap2 sys_mmap_pgoff
30+
#define __ARCH_WANT_RENAMEAT
3031
#define __ARCH_WANT_SYS_EXECVE
3132
#define __ARCH_WANT_SYS_CLONE
3233
#define __ARCH_WANT_SYS_VFORK

arch/metag/include/uapi/asm/unistd.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
* (at your option) any later version.
88
*/
99

10+
#define __ARCH_WANT_RENAMEAT
11+
1012
/* Use the standard ABI for syscalls. */
1113
#include <asm-generic/unistd.h>
1214

arch/nios2/include/uapi/asm/unistd.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
#define sys_mmap2 sys_mmap_pgoff
1919

20+
#define __ARCH_WANT_RENAMEAT
21+
2022
/* Use the standard ABI for syscalls */
2123
#include <asm-generic/unistd.h>
2224

arch/openrisc/include/uapi/asm/unistd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#define sys_mmap2 sys_mmap_pgoff
2222

23+
#define __ARCH_WANT_RENAMEAT
2324
#define __ARCH_WANT_SYS_FORK
2425
#define __ARCH_WANT_SYS_CLONE
2526

arch/score/include/uapi/asm/unistd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#define __ARCH_HAVE_MMU
22

3+
#define __ARCH_WANT_RENAMEAT
34
#define __ARCH_WANT_SYSCALL_NO_AT
45
#define __ARCH_WANT_SYSCALL_NO_FLAGS
56
#define __ARCH_WANT_SYSCALL_OFF_T

arch/tile/include/uapi/asm/unistd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* more details.
1313
*/
1414

15+
#define __ARCH_WANT_RENAMEAT
1516
#if !defined(__LP64__) || defined(__SYSCALL_COMPAT)
1617
/* Use the flavor of this syscall that matches the 32-bit API better. */
1718
#define __ARCH_WANT_SYNC_FILE_RANGE2

arch/unicore32/include/uapi/asm/unistd.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* published by the Free Software Foundation.
1111
*/
1212

13+
#define __ARCH_WANT_RENAMEAT
14+
1315
/* Use the standard ABI for syscalls. */
1416
#include <asm-generic/unistd.h>
1517
#define __ARCH_WANT_SYS_CLONE

include/uapi/asm-generic/unistd.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,11 @@ __SYSCALL(__NR_unlinkat, sys_unlinkat)
127127
__SYSCALL(__NR_symlinkat, sys_symlinkat)
128128
#define __NR_linkat 37
129129
__SYSCALL(__NR_linkat, sys_linkat)
130+
#ifdef __ARCH_WANT_RENAMEAT
131+
/* renameat is superseded with flags by renameat2 */
130132
#define __NR_renameat 38
131133
__SYSCALL(__NR_renameat, sys_renameat)
134+
#endif /* __ARCH_WANT_RENAMEAT */
132135

133136
/* fs/namespace.c */
134137
#define __NR_umount2 39

0 commit comments

Comments
 (0)