X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Finode.c;h=207cc73eac9b74933bf52c4c0ee87c4df2d86d0f;hb=3e3ff47c8527c5ba0be4e9f358d49e4b076bd6ef;hp=d8586166f600c797d3ad2af75dd9bb675a194766;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/fs/inode.c b/fs/inode.c index d8586166f..207cc73ea 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -139,10 +139,11 @@ static struct inode *alloc_inode(struct super_block *sb) struct address_space * const mapping = &inode->i_data; inode->i_sb = sb; + if (sb->s_flags & MS_TAGXID) + inode->i_xid = current->xid; + else + inode->i_xid = 0; /* maybe xid -1 would be better? */ // inode->i_dqh = dqhget(sb->s_dqh); - - /* important because of inode slab reuse */ - inode->i_xid = 0; inode->i_blkbits = sb->s_blocksize_bits; inode->i_flags = 0; atomic_set(&inode->i_count, 1); @@ -162,6 +163,7 @@ static struct inode *alloc_inode(struct super_block *sb) inode->i_bdev = NULL; inode->i_cdev = NULL; inode->i_rdev = 0; + // inode->i_xid = 0; /* maybe not too wise ... */ inode->i_security = NULL; inode->dirtied_when = 0; if (security_inode_alloc(inode)) { @@ -593,6 +595,7 @@ struct inode *new_inode(struct super_block *sb) list_add(&inode->i_list, &inode_in_use); inode->i_ino = ++last_ino; inode->i_state = 0; + inode->i_xid = vx_current_xid(); spin_unlock(&inode_lock); } return inode; @@ -1210,14 +1213,14 @@ EXPORT_SYMBOL(update_atime); * When ctime_too is specified update the ctime too. */ -void inode_update_time(struct inode *inode, struct vfsmount *mnt, int ctime_too) +void inode_update_time(struct inode *inode, int ctime_too) { struct timespec now; int sync_it = 0; if (IS_NOCMTIME(inode)) return; - if (IS_RDONLY(inode) || MNT_IS_RDONLY(mnt)) + if (IS_RDONLY(inode)) return; now = current_kernel_time();