vfs-ino.patch 556 Bytes
Newer Older
Philip Müller's avatar
Philip Müller committed
1
diff --git a/fs/inode.c b/fs/inode.c
Philip Müller's avatar
Philip Müller committed
2
index 920aa0b..1c65230 100644
Philip Müller's avatar
Philip Müller committed
3 4
--- a/fs/inode.c
+++ b/fs/inode.c
Philip Müller's avatar
Philip Müller committed
5
@@ -856,6 +856,8 @@ unsigned int get_next_ino(void)
Philip Müller's avatar
Philip Müller committed
6 7 8 9 10 11 12 13
 	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;
Philip Müller's avatar
Philip Müller committed
14
@@ -868,7 +870,7 @@ unsigned int get_next_ino(void)
Philip Müller's avatar
Philip Müller committed
15 16 17 18 19 20 21 22
 	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;