aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2010-12-17 13:29:07 -0500
committerJ. Bruce Fields <bfields@redhat.com>2010-12-17 13:29:07 -0500
commitec66ee3797e5848356cf593c6ec7aabf30a00cf1 (patch)
tree7ed5c84cc914644ffa1cd1b6a2b45db53fc224e8 /fs/nfsd
parent1205065764f2eda3216ebe213143f69891ee3460 (diff)
parentb0c3844d8af6b9f3f18f31e1b0502fbefa2166be (diff)
Merge commit 'v2.6.37-rc6' into for-2.6.38
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs3xdr.c6
-rw-r--r--fs/nfsd/nfs4state.c8
-rw-r--r--fs/nfsd/xdr4.h21
3 files changed, 18 insertions, 17 deletions
diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
index 2a533a0af2a9..7e84a852cdae 100644
--- a/fs/nfsd/nfs3xdr.c
+++ b/fs/nfsd/nfs3xdr.c
@@ -260,9 +260,11 @@ void fill_post_wcc(struct svc_fh *fhp)
260 err = vfs_getattr(fhp->fh_export->ex_path.mnt, fhp->fh_dentry, 260 err = vfs_getattr(fhp->fh_export->ex_path.mnt, fhp->fh_dentry,
261 &fhp->fh_post_attr); 261 &fhp->fh_post_attr);
262 fhp->fh_post_change = fhp->fh_dentry->d_inode->i_version; 262 fhp->fh_post_change = fhp->fh_dentry->d_inode->i_version;
263 if (err) 263 if (err) {
264 fhp->fh_post_saved = 0; 264 fhp->fh_post_saved = 0;
265 else 265 /* Grab the ctime anyway - set_change_info might use it */
266 fhp->fh_post_attr.ctime = fhp->fh_dentry->d_inode->i_ctime;
267 } else
266 fhp->fh_post_saved = 1; 268 fhp->fh_post_saved = 1;
267} 269}
268 270
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index afa7525a86be..4d542cfd6960 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2266,7 +2266,7 @@ nfs4_file_downgrade(struct nfs4_file *fp, unsigned int share_access)
2266 * Spawn a thread to perform a recall on the delegation represented 2266 * Spawn a thread to perform a recall on the delegation represented
2267 * by the lease (file_lock) 2267 * by the lease (file_lock)
2268 * 2268 *
2269 * Called from break_lease() with lock_kernel() held. 2269 * Called from break_lease() with lock_flocks() held.
2270 * Note: we assume break_lease will only call this *once* for any given 2270 * Note: we assume break_lease will only call this *once* for any given
2271 * lease. 2271 * lease.
2272 */ 2272 */
@@ -2290,7 +2290,7 @@ void nfsd_break_deleg_cb(struct file_lock *fl)
2290 list_add_tail(&dp->dl_recall_lru, &del_recall_lru); 2290 list_add_tail(&dp->dl_recall_lru, &del_recall_lru);
2291 spin_unlock(&recall_lock); 2291 spin_unlock(&recall_lock);
2292 2292
2293 /* only place dl_time is set. protected by lock_kernel*/ 2293 /* only place dl_time is set. protected by lock_flocks*/
2294 dp->dl_time = get_seconds(); 2294 dp->dl_time = get_seconds();
2295 2295
2296 /* 2296 /*
@@ -2307,7 +2307,7 @@ void nfsd_break_deleg_cb(struct file_lock *fl)
2307/* 2307/*
2308 * The file_lock is being reapd. 2308 * The file_lock is being reapd.
2309 * 2309 *
2310 * Called by locks_free_lock() with lock_kernel() held. 2310 * Called by locks_free_lock() with lock_flocks() held.
2311 */ 2311 */
2312static 2312static
2313void nfsd_release_deleg_cb(struct file_lock *fl) 2313void nfsd_release_deleg_cb(struct file_lock *fl)
@@ -2322,7 +2322,7 @@ void nfsd_release_deleg_cb(struct file_lock *fl)
2322} 2322}
2323 2323
2324/* 2324/*
2325 * Called from setlease() with lock_kernel() held 2325 * Called from setlease() with lock_flocks() held
2326 */ 2326 */
2327static 2327static
2328int nfsd_same_client_deleg_cb(struct file_lock *onlist, struct file_lock *try) 2328int nfsd_same_client_deleg_cb(struct file_lock *onlist, struct file_lock *try)
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h
index 4d476ff08ae6..60fce3dc5cb5 100644
--- a/fs/nfsd/xdr4.h
+++ b/fs/nfsd/xdr4.h
@@ -484,18 +484,17 @@ static inline bool nfsd4_not_cached(struct nfsd4_compoundres *resp)
484static inline void 484static inline void
485set_change_info(struct nfsd4_change_info *cinfo, struct svc_fh *fhp) 485set_change_info(struct nfsd4_change_info *cinfo, struct svc_fh *fhp)
486{ 486{
487 BUG_ON(!fhp->fh_pre_saved || !fhp->fh_post_saved); 487 BUG_ON(!fhp->fh_pre_saved);
488 cinfo->atomic = 1; 488 cinfo->atomic = fhp->fh_post_saved;
489 cinfo->change_supported = IS_I_VERSION(fhp->fh_dentry->d_inode); 489 cinfo->change_supported = IS_I_VERSION(fhp->fh_dentry->d_inode);
490 if (cinfo->change_supported) { 490
491 cinfo->before_change = fhp->fh_pre_change; 491 cinfo->before_change = fhp->fh_pre_change;
492 cinfo->after_change = fhp->fh_post_change; 492 cinfo->after_change = fhp->fh_post_change;
493 } else { 493 cinfo->before_ctime_sec = fhp->fh_pre_ctime.tv_sec;
494 cinfo->before_ctime_sec = fhp->fh_pre_ctime.tv_sec; 494 cinfo->before_ctime_nsec = fhp->fh_pre_ctime.tv_nsec;
495 cinfo->before_ctime_nsec = fhp->fh_pre_ctime.tv_nsec; 495 cinfo->after_ctime_sec = fhp->fh_post_attr.ctime.tv_sec;
496 cinfo->after_ctime_sec = fhp->fh_post_attr.ctime.tv_sec; 496 cinfo->after_ctime_nsec = fhp->fh_post_attr.ctime.tv_nsec;
497 cinfo->after_ctime_nsec = fhp->fh_post_attr.ctime.tv_nsec; 497
498 }
499} 498}
500 499
501int nfs4svc_encode_voidres(struct svc_rqst *, __be32 *, void *); 500int nfs4svc_encode_voidres(struct svc_rqst *, __be32 *, void *);