aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4state.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 19ca9b54200b..7355fe405d69 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -4505,18 +4505,19 @@ void nfsd_forget_openowners(u64 num)
4505int nfsd_process_n_delegations(u64 num, void (*deleg_func)(struct nfs4_delegation *)) 4505int nfsd_process_n_delegations(u64 num, void (*deleg_func)(struct nfs4_delegation *))
4506{ 4506{
4507 int i, count = 0; 4507 int i, count = 0;
4508 struct nfs4_file *fp; 4508 struct nfs4_file *fp, *fnext;
4509 struct nfs4_delegation *dp, *next; 4509 struct nfs4_delegation *dp, *dnext;
4510 4510
4511 for (i = 0; i < FILE_HASH_SIZE; i++) { 4511 for (i = 0; i < FILE_HASH_SIZE; i++) {
4512 list_for_each_entry(fp, &file_hashtbl[i], fi_hash) { 4512 list_for_each_entry_safe(fp, fnext, &file_hashtbl[i], fi_hash) {
4513 list_for_each_entry_safe(dp, next, &fp->fi_delegations, dl_perfile) { 4513 list_for_each_entry_safe(dp, dnext, &fp->fi_delegations, dl_perfile) {
4514 deleg_func(dp); 4514 deleg_func(dp);
4515 if (++count == num) 4515 if (++count == num)
4516 return count; 4516 return count;
4517 } 4517 }
4518 } 4518 }
4519 } 4519 }
4520
4520 return count; 4521 return count;
4521} 4522}
4522 4523