node.c (22ad0b6ab46683975c6da032f1c2593066c7b3bd) | node.c (55523519bc7227e651fd4febeb3aafdd22b8af1c) |
---|---|
1/* 2 * fs/f2fs/node.c 3 * 4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 * http://www.samsung.com/ 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 1973 unchanged lines hidden (view full) --- 1982 * The returned nid could be used ino as well as nid when inode is created. 1983 */ 1984bool alloc_nid(struct f2fs_sb_info *sbi, nid_t *nid) 1985{ 1986 struct f2fs_nm_info *nm_i = NM_I(sbi); 1987 struct free_nid *i = NULL; 1988retry: 1989#ifdef CONFIG_F2FS_FAULT_INJECTION | 1/* 2 * fs/f2fs/node.c 3 * 4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 * http://www.samsung.com/ 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 1973 unchanged lines hidden (view full) --- 1982 * The returned nid could be used ino as well as nid when inode is created. 1983 */ 1984bool alloc_nid(struct f2fs_sb_info *sbi, nid_t *nid) 1985{ 1986 struct f2fs_nm_info *nm_i = NM_I(sbi); 1987 struct free_nid *i = NULL; 1988retry: 1989#ifdef CONFIG_F2FS_FAULT_INJECTION |
1990 if (time_to_inject(sbi, FAULT_ALLOC_NID)) | 1990 if (time_to_inject(sbi, FAULT_ALLOC_NID)) { 1991 f2fs_show_injection_info(FAULT_ALLOC_NID); |
1991 return false; | 1992 return false; |
1993 } |
|
1992#endif 1993 spin_lock(&nm_i->nid_list_lock); 1994 1995 if (unlikely(nm_i->available_nids == 0)) { 1996 spin_unlock(&nm_i->nid_list_lock); 1997 return false; 1998 } 1999 --- 673 unchanged lines hidden --- | 1994#endif 1995 spin_lock(&nm_i->nid_list_lock); 1996 1997 if (unlikely(nm_i->available_nids == 0)) { 1998 spin_unlock(&nm_i->nid_list_lock); 1999 return false; 2000 } 2001 --- 673 unchanged lines hidden --- |