Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118136
b: refs/heads/master
c: ae05f26
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Oct 28, 2008
1 parent ad9c8c4 commit 379a204
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 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: 2a9e1cfa23fb62da37739af81127dab5af095d99
refs/heads/master: ae05f269400533cbb32bfba131ab528d78dffd16
11 changes: 3 additions & 8 deletions trunk/fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,21 +908,16 @@ static int nfs_size_need_update(const struct inode *inode, const struct nfs_fatt
return nfs_size_to_loff_t(fattr->size) > i_size_read(inode);
}

static unsigned long nfs_attr_generation_counter;
static atomic_long_t nfs_attr_generation_counter;

static unsigned long nfs_read_attr_generation_counter(void)
{
smp_rmb();
return nfs_attr_generation_counter;
return atomic_long_read(&nfs_attr_generation_counter);
}

unsigned long nfs_inc_attr_generation_counter(void)
{
unsigned long ret;
smp_rmb();
ret = ++nfs_attr_generation_counter;
smp_wmb();
return ret;
return atomic_long_inc_return(&nfs_attr_generation_counter);
}

void nfs_fattr_init(struct nfs_fattr *fattr)
Expand Down

0 comments on commit 379a204

Please sign in to comment.