aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-10-31 00:17:34 -0700
committerDavid S. Miller <davem@davemloft.net>2008-10-31 00:17:34 -0700
commita1744d3bee19d3b9cbfb825ab316a101b9c9f109 (patch)
treec0e2324c09beca0eb5782eb5abf241ea2b7a4a11 /fs/nfs
parent275f165fa970174f8a98205529750e8abb6c0a33 (diff)
parenta432226614c5616e3cfd211e0acffa0acfb4770c (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/wireless/p54/p54common.c
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/inode.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index dc52793ff8f..d22eb383e1c 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -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)