Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165064
b: refs/heads/master
c: 292dd27
h: refs/heads/master
v: v3
  • Loading branch information
Joel Becker committed Sep 4, 2009
1 parent 3361650 commit 99774e2
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 66fb345ddd2d343e36692da0ff66126d7a99dc1b
refs/heads/master: 292dd27ec76b96cebcef576f330ab121f59ccf05
1 change: 0 additions & 1 deletion trunk/fs/ocfs2/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,6 @@ void ocfs2_clear_inode(struct inode *inode)

/* Clear all other flags. */
oi->ip_flags = 0;
oi->ip_created_trans = 0;
oi->ip_dir_start_lookup = 0;
oi->ip_blkno = 0ULL;

Expand Down
4 changes: 0 additions & 4 deletions trunk/fs/ocfs2/inode.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ struct ocfs2_inode_info

u32 ip_dir_start_lookup;

/* next two are protected by trans_inc_lock */
/* which transaction were we created on? Zero if none. */
unsigned long ip_created_trans;

struct ocfs2_caching_info ip_metadata_cache;

struct ocfs2_extent_map ip_extent_map;
Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/ocfs2/journal.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ static inline int ocfs2_inode_is_new(struct inode *inode)
return 0;
spin_lock(&trans_inc_lock);
ret = !(time_after(OCFS2_SB(inode->i_sb)->journal->j_trans_id,
OCFS2_I(inode)->ip_created_trans));
INODE_CACHE(inode)->ci_created_trans));
if (!ret)
OCFS2_I(inode)->ip_created_trans = 0;
INODE_CACHE(inode)->ci_created_trans = 0;
spin_unlock(&trans_inc_lock);
return ret;
}
Expand All @@ -140,7 +140,7 @@ static inline void ocfs2_inode_set_new(struct ocfs2_super *osb,
struct inode *inode)
{
spin_lock(&trans_inc_lock);
OCFS2_I(inode)->ip_created_trans = osb->journal->j_trans_id;
INODE_CACHE(inode)->ci_created_trans = osb->journal->j_trans_id;
spin_unlock(&trans_inc_lock);
}

Expand Down
3 changes: 3 additions & 0 deletions trunk/fs/ocfs2/ocfs2.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ struct ocfs2_caching_info {
*/
const struct ocfs2_caching_operations *ci_ops;

/* next two are protected by trans_inc_lock */
/* which transaction were we created on? Zero if none. */
unsigned long ci_created_trans;
/* last transaction we were a part of. */
unsigned long ci_last_trans;

Expand Down
1 change: 0 additions & 1 deletion trunk/fs/ocfs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1668,7 +1668,6 @@ static void ocfs2_inode_init_once(void *data)
spin_lock_init(&oi->ip_lock);
ocfs2_extent_map_init(&oi->vfs_inode);
INIT_LIST_HEAD(&oi->ip_io_markers);
oi->ip_created_trans = 0;
oi->ip_dir_start_lookup = 0;

init_rwsem(&oi->ip_alloc_sem);
Expand Down
4 changes: 3 additions & 1 deletion trunk/fs/ocfs2/uptodate.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ static void ocfs2_metadata_cache_reset(struct ocfs2_caching_info *ci,
ci->ci_flags |= OCFS2_CACHE_FL_INLINE;
ci->ci_num_cached = 0;

if (clear)
if (clear) {
ci->ci_created_trans = 0;
ci->ci_last_trans = 0;
}
}

void ocfs2_metadata_cache_init(struct ocfs2_caching_info *ci,
Expand Down

0 comments on commit 99774e2

Please sign in to comment.