2016-10-23 14:10:48 +02:00
|
|
|
diff --git a/fs/inode.c b/fs/inode.c
|
2017-06-03 03:34:14 +02:00
|
|
|
index 88110fd..64a2f22 100644
|
2016-10-23 14:10:48 +02:00
|
|
|
--- a/fs/inode.c
|
|
|
|
+++ b/fs/inode.c
|
2017-06-03 03:34:14 +02:00
|
|
|
@@ -855,6 +855,8 @@ unsigned int get_next_ino(void)
|
2016-10-23 14:10:48 +02:00
|
|
|
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;
|
2017-06-03 03:34:14 +02:00
|
|
|
@@ -867,7 +869,7 @@ unsigned int get_next_ino(void)
|
2016-10-23 14:10:48 +02:00
|
|
|
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;
|