vfs-ino.patch 599 B

123456789101112131415161718192021222324
  1. SPDX-License-Identifier: GPL-2.0
  2. diff --git a/fs/inode.c b/fs/inode.c
  3. index 9a453f3637f8..d6887a6ad79f 100644
  4. --- a/fs/inode.c
  5. +++ b/fs/inode.c
  6. @@ -869,6 +869,8 @@ unsigned int get_next_ino(void)
  7. unsigned int *p = &get_cpu_var(last_ino);
  8. unsigned int res = *p;
  9. +start:
  10. +
  11. #ifdef CONFIG_SMP
  12. if (unlikely((res & (LAST_INO_BATCH-1)) == 0)) {
  13. static atomic_t shared_last_ino;
  14. @@ -881,7 +883,7 @@ unsigned int get_next_ino(void)
  15. res++;
  16. /* get_next_ino should not provide a 0 inode number */
  17. if (unlikely(!res))
  18. - res++;
  19. + goto start;
  20. *p = res;
  21. put_cpu_var(last_ino);
  22. return res;