diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-11-12 06:39:21 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-12 06:39:21 -0500 |
commit | 708b8eae0fd532af73ea8350e6dcc10255ff7376 (patch) | |
tree | f336436934fd79bc91aff7112a9beb10bc4e839f /fs/nfs/inode.c | |
parent | d98d38f2014ab79f28c126ff175d034891f7aefc (diff) | |
parent | f21f237cf55494c3a4209de323281a3b0528da10 (diff) |
Merge branch 'linus' into core/locking
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index b9195c02a863..d22eb383e1cf 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * nfs inode and superblock handling functions | 6 | * nfs inode and superblock handling functions |
7 | * | 7 | * |
8 | * Modularised by Alan Cox <Alan.Cox@linux.org>, while hacking some | 8 | * Modularised by Alan Cox <alan@lxorguk.ukuu.org.uk>, while hacking some |
9 | * experimental NFS changes. Modularisation taken straight from SYS5 fs. | 9 | * experimental NFS changes. Modularisation taken straight from SYS5 fs. |
10 | * | 10 | * |
11 | * Change to nfs_read_super() to permit NFS mounts to multi-homed hosts. | 11 | * Change to nfs_read_super() to permit NFS mounts to multi-homed hosts. |
@@ -908,21 +908,16 @@ static int nfs_size_need_update(const struct inode *inode, const struct nfs_fatt | |||
908 | return nfs_size_to_loff_t(fattr->size) > i_size_read(inode); | 908 | return nfs_size_to_loff_t(fattr->size) > i_size_read(inode); |
909 | } | 909 | } |
910 | 910 | ||
911 | static unsigned long nfs_attr_generation_counter; | 911 | static atomic_long_t nfs_attr_generation_counter; |
912 | 912 | ||
913 | static unsigned long nfs_read_attr_generation_counter(void) | 913 | static unsigned long nfs_read_attr_generation_counter(void) |
914 | { | 914 | { |
915 | smp_rmb(); | 915 | return atomic_long_read(&nfs_attr_generation_counter); |
916 | return nfs_attr_generation_counter; | ||
917 | } | 916 | } |
918 | 917 | ||
919 | unsigned long nfs_inc_attr_generation_counter(void) | 918 | unsigned long nfs_inc_attr_generation_counter(void) |
920 | { | 919 | { |
921 | unsigned long ret; | 920 | return atomic_long_inc_return(&nfs_attr_generation_counter); |
922 | smp_rmb(); | ||
923 | ret = ++nfs_attr_generation_counter; | ||
924 | smp_wmb(); | ||
925 | return ret; | ||
926 | } | 921 | } |
927 | 922 | ||
928 | void nfs_fattr_init(struct nfs_fattr *fattr) | 923 | void nfs_fattr_init(struct nfs_fattr *fattr) |