aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 5c97d47676ae..bf11d6879ab4 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -3249,12 +3249,14 @@ nfs4_state_shutdown(void)
3249 nfs4_unlock_state(); 3249 nfs4_unlock_state();
3250} 3250}
3251 3251
3252/*
3253 * user_recovery_dirname is protected by the nfsd_mutex since it's only
3254 * accessed when nfsd is starting.
3255 */
3252static void 3256static void
3253nfs4_set_recdir(char *recdir) 3257nfs4_set_recdir(char *recdir)
3254{ 3258{
3255 nfs4_lock_state();
3256 strcpy(user_recovery_dirname, recdir); 3259 strcpy(user_recovery_dirname, recdir);
3257 nfs4_unlock_state();
3258} 3260}
3259 3261
3260/* 3262/*
@@ -3278,6 +3280,12 @@ nfs4_reset_recoverydir(char *recdir)
3278 return status; 3280 return status;
3279} 3281}
3280 3282
3283char *
3284nfs4_recoverydir(void)
3285{
3286 return user_recovery_dirname;
3287}
3288
3281/* 3289/*
3282 * Called when leasetime is changed. 3290 * Called when leasetime is changed.
3283 * 3291 *
@@ -3286,11 +3294,12 @@ nfs4_reset_recoverydir(char *recdir)
3286 * we start to register any changes in lease time. If the administrator 3294 * we start to register any changes in lease time. If the administrator
3287 * really wants to change the lease time *now*, they can go ahead and bring 3295 * really wants to change the lease time *now*, they can go ahead and bring
3288 * nfsd down and then back up again after changing the lease time. 3296 * nfsd down and then back up again after changing the lease time.
3297 *
3298 * user_lease_time is protected by nfsd_mutex since it's only really accessed
3299 * when nfsd is starting
3289 */ 3300 */
3290void 3301void
3291nfs4_reset_lease(time_t leasetime) 3302nfs4_reset_lease(time_t leasetime)
3292{ 3303{
3293 lock_kernel();
3294 user_lease_time = leasetime; 3304 user_lease_time = leasetime;
3295 unlock_kernel();
3296} 3305}