This repository has been archived on 2020-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
linux57/vfs-ino.patch

25 lines
600 B
Diff

SPDX-License-Identifier: GPL-2.0
diff --git a/fs/inode.c b/fs/inode.c
index 93d9252a00ab..325fbc77b91a 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -894,6 +894,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;
@@ -906,7 +908,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;