inode.c (01b944fe1cd4e21a2a9ed51adbdbafe2d5e905ba) | inode.c (513e2dae9422223072ed3887e91efebec2fc0a01) |
---|---|
1/* -*- mode: c; c-basic-offset: 8; -*- 2 * vim: noexpandtab sw=8 ts=8 sts=0: 3 * 4 * inode.c 5 * 6 * vfs' aops, fops, dops and iops 7 * 8 * Copyright (C) 2002, 2004 Oracle. All rights reserved. --- 1177 unchanged lines hidden (view full) --- 1186} 1187 1188/* Called under inode_lock, with no more references on the 1189 * struct inode, so it's safe here to check the flags field 1190 * and to manipulate i_nlink without any other locks. */ 1191int ocfs2_drop_inode(struct inode *inode) 1192{ 1193 struct ocfs2_inode_info *oi = OCFS2_I(inode); | 1/* -*- mode: c; c-basic-offset: 8; -*- 2 * vim: noexpandtab sw=8 ts=8 sts=0: 3 * 4 * inode.c 5 * 6 * vfs' aops, fops, dops and iops 7 * 8 * Copyright (C) 2002, 2004 Oracle. All rights reserved. --- 1177 unchanged lines hidden (view full) --- 1186} 1187 1188/* Called under inode_lock, with no more references on the 1189 * struct inode, so it's safe here to check the flags field 1190 * and to manipulate i_nlink without any other locks. */ 1191int ocfs2_drop_inode(struct inode *inode) 1192{ 1193 struct ocfs2_inode_info *oi = OCFS2_I(inode); |
1194 int res; | |
1195 1196 trace_ocfs2_drop_inode((unsigned long long)oi->ip_blkno, 1197 inode->i_nlink, oi->ip_flags); 1198 | 1194 1195 trace_ocfs2_drop_inode((unsigned long long)oi->ip_blkno, 1196 inode->i_nlink, oi->ip_flags); 1197 |
1199 if (oi->ip_flags & OCFS2_INODE_MAYBE_ORPHANED) 1200 res = 1; 1201 else 1202 res = generic_drop_inode(inode); | 1198 assert_spin_locked(&inode->i_lock); 1199 inode->i_state |= I_WILL_FREE; 1200 spin_unlock(&inode->i_lock); 1201 write_inode_now(inode, 1); 1202 spin_lock(&inode->i_lock); 1203 WARN_ON(inode->i_state & I_NEW); 1204 inode->i_state &= ~I_WILL_FREE; |
1203 | 1205 |
1204 return res; | 1206 return 1; |
1205} 1206 1207/* 1208 * This is called from our getattr. 1209 */ 1210int ocfs2_inode_revalidate(struct dentry *dentry) 1211{ 1212 struct inode *inode = d_inode(dentry); --- 248 unchanged lines hidden --- | 1207} 1208 1209/* 1210 * This is called from our getattr. 1211 */ 1212int ocfs2_inode_revalidate(struct dentry *dentry) 1213{ 1214 struct inode *inode = d_inode(dentry); --- 248 unchanged lines hidden --- |