Message ID | 20241216142156.4133267-4-yangerkun@huaweicloud.com (mailing list archive) |
---|---|
State | Under Review |
Headers | show |
Series | nfsd/sunrpc: cleanup resource with sync mode | expand |
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 56002d9ef66b..1c795dc5a74b 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -1427,15 +1427,9 @@ static int e_show(struct seq_file *m, void *p) return 0; } - if (!cache_get_rcu(&exp->h)) + if (cache_check(cd, &exp->h, NULL)) return 0; - if (cache_check(cd, &exp->h, NULL)) { - cache_put(&exp->h, cd); - return 0; - } - - exp_put(exp); return svc_export_show(m, cd, cp); }