inode.c (35858adbfca13678af99fb31618ef4428d6dedb0) | inode.c (009d851837ab26cab18adda6169a813f70b0b21b) |
---|---|
1/* 2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. 3 * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved. 4 * 5 * This copyrighted material is made available to anyone wishing to use, 6 * modify, copy, or redistribute it subject to the terms and conditions 7 * of the GNU General Public License version 2. 8 */ --- 31 unchanged lines hidden (view full) --- 40 u64 ir_length; 41}; 42 43static int iget_test(struct inode *inode, void *opaque) 44{ 45 struct gfs2_inode *ip = GFS2_I(inode); 46 u64 *no_addr = opaque; 47 | 1/* 2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. 3 * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved. 4 * 5 * This copyrighted material is made available to anyone wishing to use, 6 * modify, copy, or redistribute it subject to the terms and conditions 7 * of the GNU General Public License version 2. 8 */ --- 31 unchanged lines hidden (view full) --- 40 u64 ir_length; 41}; 42 43static int iget_test(struct inode *inode, void *opaque) 44{ 45 struct gfs2_inode *ip = GFS2_I(inode); 46 u64 *no_addr = opaque; 47 |
48 if (ip->i_no_addr == *no_addr && test_bit(GIF_USER, &ip->i_flags)) | 48 if (ip->i_no_addr == *no_addr) |
49 return 1; 50 51 return 0; 52} 53 54static int iget_set(struct inode *inode, void *opaque) 55{ 56 struct gfs2_inode *ip = GFS2_I(inode); 57 u64 *no_addr = opaque; 58 59 inode->i_ino = (unsigned long)*no_addr; 60 ip->i_no_addr = *no_addr; | 49 return 1; 50 51 return 0; 52} 53 54static int iget_set(struct inode *inode, void *opaque) 55{ 56 struct gfs2_inode *ip = GFS2_I(inode); 57 u64 *no_addr = opaque; 58 59 inode->i_ino = (unsigned long)*no_addr; 60 ip->i_no_addr = *no_addr; |
61 set_bit(GIF_USER, &ip->i_flags); | |
62 return 0; 63} 64 65struct inode *gfs2_ilookup(struct super_block *sb, u64 no_addr) 66{ 67 unsigned long hash = (unsigned long)no_addr; 68 return ilookup5(sb, hash, iget_test, &no_addr); 69} --- 9 unchanged lines hidden (view full) --- 79 int skipped; 80}; 81 82static int iget_skip_test(struct inode *inode, void *opaque) 83{ 84 struct gfs2_inode *ip = GFS2_I(inode); 85 struct gfs2_skip_data *data = opaque; 86 | 61 return 0; 62} 63 64struct inode *gfs2_ilookup(struct super_block *sb, u64 no_addr) 65{ 66 unsigned long hash = (unsigned long)no_addr; 67 return ilookup5(sb, hash, iget_test, &no_addr); 68} --- 9 unchanged lines hidden (view full) --- 78 int skipped; 79}; 80 81static int iget_skip_test(struct inode *inode, void *opaque) 82{ 83 struct gfs2_inode *ip = GFS2_I(inode); 84 struct gfs2_skip_data *data = opaque; 85 |
87 if (ip->i_no_addr == data->no_addr && test_bit(GIF_USER, &ip->i_flags)){ | 86 if (ip->i_no_addr == data->no_addr) { |
88 if (inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE)){ 89 data->skipped = 1; 90 return 0; 91 } 92 return 1; 93 } 94 return 0; 95} 96 97static int iget_skip_set(struct inode *inode, void *opaque) 98{ 99 struct gfs2_inode *ip = GFS2_I(inode); 100 struct gfs2_skip_data *data = opaque; 101 102 if (data->skipped) 103 return 1; 104 inode->i_ino = (unsigned long)(data->no_addr); 105 ip->i_no_addr = data->no_addr; | 87 if (inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE)){ 88 data->skipped = 1; 89 return 0; 90 } 91 return 1; 92 } 93 return 0; 94} 95 96static int iget_skip_set(struct inode *inode, void *opaque) 97{ 98 struct gfs2_inode *ip = GFS2_I(inode); 99 struct gfs2_skip_data *data = opaque; 100 101 if (data->skipped) 102 return 1; 103 inode->i_ino = (unsigned long)(data->no_addr); 104 ip->i_no_addr = data->no_addr; |
106 set_bit(GIF_USER, &ip->i_flags); | |
107 return 0; 108} 109 110static struct inode *gfs2_iget_skip(struct super_block *sb, 111 u64 no_addr) 112{ 113 struct gfs2_skip_data data; 114 unsigned long hash = (unsigned long)no_addr; --- 887 unchanged lines hidden --- | 105 return 0; 106} 107 108static struct inode *gfs2_iget_skip(struct super_block *sb, 109 u64 no_addr) 110{ 111 struct gfs2_skip_data data; 112 unsigned long hash = (unsigned long)no_addr; --- 887 unchanged lines hidden --- |