File: vfs-ino.patch

package info (click to toggle)
aufs 4.19+20190211-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 1,316 kB
  • sloc: ansic: 27,214; makefile: 100
file content (23 lines) | stat: -rw-r--r-- 599 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
SPDX-License-Identifier: GPL-2.0
diff --git a/fs/inode.c b/fs/inode.c
index 65ae154df760..366d0faab59b 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -872,6 +872,8 @@ unsigned int get_next_ino(void)
 	unsigned int *p = &get_cpu_var(last_ino);
 	unsigned int res = *p;
 
+start:
+
 #ifdef CONFIG_SMP
 	if (unlikely((res & (LAST_INO_BATCH-1)) == 0)) {
 		static atomic_t shared_last_ino;
@@ -884,7 +886,7 @@ unsigned int get_next_ino(void)
 	res++;
 	/* get_next_ino should not provide a 0 inode number */
 	if (unlikely(!res))
-		res++;
+		goto start;
 	*p = res;
 	put_cpu_var(last_ino);
 	return res;