f2fs.h (8bc6f60e3f7f31c4ce370b4b27b8f4b355b7f07e) | f2fs.h (d6b7d4b31dfd5a454a71c445b8086bc098237334) |
---|---|
1/* 2 * fs/f2fs/f2fs.h 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 --- 627 unchanged lines hidden (view full) --- 636 up_write(&sbi->cp_rwsem); 637} 638 639/* 640 * Check whether the given nid is within node id range. 641 */ 642static inline int check_nid_range(struct f2fs_sb_info *sbi, nid_t nid) 643{ | 1/* 2 * fs/f2fs/f2fs.h 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 --- 627 unchanged lines hidden (view full) --- 636 up_write(&sbi->cp_rwsem); 637} 638 639/* 640 * Check whether the given nid is within node id range. 641 */ 642static inline int check_nid_range(struct f2fs_sb_info *sbi, nid_t nid) 643{ |
644 WARN_ON((nid >= NM_I(sbi)->max_nid)); | 644 if (unlikely(nid < F2FS_ROOT_INO(sbi))) 645 return -EINVAL; |
645 if (unlikely(nid >= NM_I(sbi)->max_nid)) 646 return -EINVAL; 647 return 0; 648} 649 650#define F2FS_DEFAULT_ALLOCATED_BLOCKS 1 651 652/* --- 771 unchanged lines hidden --- | 646 if (unlikely(nid >= NM_I(sbi)->max_nid)) 647 return -EINVAL; 648 return 0; 649} 650 651#define F2FS_DEFAULT_ALLOCATED_BLOCKS 1 652 653/* --- 771 unchanged lines hidden --- |