diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2007-09-24 15:40:11 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-09 17:18:24 -0400 |
commit | 77a55a1fe8f26f7d022986a599b68002e21d968a (patch) | |
tree | 63e804b1105d535149e0fd558c96a8c3efcc8dce /fs/nfs/dir.c | |
parent | 92f6c178250170222f6d80c8ae725400765aa7a4 (diff) |
NFS: Eliminate nfs_renew_times()
The nfs_renew_times() function plants the current time in jiffies in
dentry->d_time. But a call to nfs_renew_times() is always followed by
another call that overwrites dentry->d_time. Get rid of the
nfs_renew_times() calls.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 439346abda62..78144daeb70f 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -672,15 +672,6 @@ static void nfs_refresh_verifier(struct dentry * dentry, unsigned long verf) | |||
672 | } | 672 | } |
673 | 673 | ||
674 | /* | 674 | /* |
675 | * Whenever an NFS operation succeeds, we know that the dentry | ||
676 | * is valid, so we update the revalidation timestamp. | ||
677 | */ | ||
678 | static inline void nfs_renew_times(struct dentry * dentry) | ||
679 | { | ||
680 | dentry->d_time = jiffies; | ||
681 | } | ||
682 | |||
683 | /* | ||
684 | * Return the intent data that applies to this particular path component | 675 | * Return the intent data that applies to this particular path component |
685 | * | 676 | * |
686 | * Note that the current set of intents only apply to the very last | 677 | * Note that the current set of intents only apply to the very last |
@@ -803,7 +794,6 @@ static int nfs_lookup_revalidate(struct dentry * dentry, struct nameidata *nd) | |||
803 | if ((error = nfs_refresh_inode(inode, &fattr)) != 0) | 794 | if ((error = nfs_refresh_inode(inode, &fattr)) != 0) |
804 | goto out_bad; | 795 | goto out_bad; |
805 | 796 | ||
806 | nfs_renew_times(dentry); | ||
807 | nfs_refresh_verifier(dentry, verifier); | 797 | nfs_refresh_verifier(dentry, verifier); |
808 | out_valid: | 798 | out_valid: |
809 | unlock_kernel(); | 799 | unlock_kernel(); |
@@ -966,7 +956,6 @@ no_entry: | |||
966 | dput(parent); | 956 | dput(parent); |
967 | dentry = res; | 957 | dentry = res; |
968 | } | 958 | } |
969 | nfs_renew_times(dentry); | ||
970 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); | 959 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); |
971 | out_unlock: | 960 | out_unlock: |
972 | unlock_kernel(); | 961 | unlock_kernel(); |
@@ -1061,7 +1050,6 @@ static struct dentry *nfs_atomic_lookup(struct inode *dir, struct dentry *dentry | |||
1061 | } | 1050 | } |
1062 | } else if (res != NULL) | 1051 | } else if (res != NULL) |
1063 | dentry = res; | 1052 | dentry = res; |
1064 | nfs_renew_times(dentry); | ||
1065 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); | 1053 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); |
1066 | out: | 1054 | out: |
1067 | return res; | 1055 | return res; |
@@ -1181,11 +1169,9 @@ static struct dentry *nfs_readdir_lookup(nfs_readdir_descriptor_t *desc) | |||
1181 | dentry = alias; | 1169 | dentry = alias; |
1182 | } | 1170 | } |
1183 | 1171 | ||
1184 | nfs_renew_times(dentry); | ||
1185 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); | 1172 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); |
1186 | return dentry; | 1173 | return dentry; |
1187 | out_renew: | 1174 | out_renew: |
1188 | nfs_renew_times(dentry); | ||
1189 | nfs_refresh_verifier(dentry, nfs_save_change_attribute(dir)); | 1175 | nfs_refresh_verifier(dentry, nfs_save_change_attribute(dir)); |
1190 | return dentry; | 1176 | return dentry; |
1191 | } | 1177 | } |
@@ -1252,7 +1238,6 @@ static int nfs_create(struct inode *dir, struct dentry *dentry, int mode, | |||
1252 | nfs_end_data_update(dir); | 1238 | nfs_end_data_update(dir); |
1253 | if (error != 0) | 1239 | if (error != 0) |
1254 | goto out_err; | 1240 | goto out_err; |
1255 | nfs_renew_times(dentry); | ||
1256 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); | 1241 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); |
1257 | unlock_kernel(); | 1242 | unlock_kernel(); |
1258 | return 0; | 1243 | return 0; |
@@ -1286,7 +1271,6 @@ nfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev) | |||
1286 | nfs_end_data_update(dir); | 1271 | nfs_end_data_update(dir); |
1287 | if (status != 0) | 1272 | if (status != 0) |
1288 | goto out_err; | 1273 | goto out_err; |
1289 | nfs_renew_times(dentry); | ||
1290 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); | 1274 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); |
1291 | unlock_kernel(); | 1275 | unlock_kernel(); |
1292 | return 0; | 1276 | return 0; |
@@ -1316,7 +1300,6 @@ static int nfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) | |||
1316 | nfs_end_data_update(dir); | 1300 | nfs_end_data_update(dir); |
1317 | if (error != 0) | 1301 | if (error != 0) |
1318 | goto out_err; | 1302 | goto out_err; |
1319 | nfs_renew_times(dentry); | ||
1320 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); | 1303 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); |
1321 | unlock_kernel(); | 1304 | unlock_kernel(); |
1322 | return 0; | 1305 | return 0; |
@@ -1409,7 +1392,6 @@ static int nfs_sillyrename(struct inode *dir, struct dentry *dentry) | |||
1409 | dir, &qsilly); | 1392 | dir, &qsilly); |
1410 | nfs_end_data_update(dir); | 1393 | nfs_end_data_update(dir); |
1411 | if (!error) { | 1394 | if (!error) { |
1412 | nfs_renew_times(dentry); | ||
1413 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); | 1395 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); |
1414 | d_move(dentry, sdentry); | 1396 | d_move(dentry, sdentry); |
1415 | error = nfs_async_unlink(dir, dentry); | 1397 | error = nfs_async_unlink(dir, dentry); |
@@ -1492,7 +1474,6 @@ static int nfs_unlink(struct inode *dir, struct dentry *dentry) | |||
1492 | spin_unlock(&dcache_lock); | 1474 | spin_unlock(&dcache_lock); |
1493 | error = nfs_safe_remove(dentry); | 1475 | error = nfs_safe_remove(dentry); |
1494 | if (!error) { | 1476 | if (!error) { |
1495 | nfs_renew_times(dentry); | ||
1496 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); | 1477 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); |
1497 | } else if (need_rehash) | 1478 | } else if (need_rehash) |
1498 | d_rehash(dentry); | 1479 | d_rehash(dentry); |
@@ -1714,7 +1695,6 @@ out: | |||
1714 | d_rehash(rehash); | 1695 | d_rehash(rehash); |
1715 | if (!error) { | 1696 | if (!error) { |
1716 | d_move(old_dentry, new_dentry); | 1697 | d_move(old_dentry, new_dentry); |
1717 | nfs_renew_times(new_dentry); | ||
1718 | nfs_refresh_verifier(new_dentry, nfs_save_change_attribute(new_dir)); | 1698 | nfs_refresh_verifier(new_dentry, nfs_save_change_attribute(new_dir)); |
1719 | } | 1699 | } |
1720 | 1700 | ||