From: Jinshan Xiong Date: Tue, 12 Apr 2016 20:14:07 +0000 (-0400) Subject: staging: lustre: llite: error setting max_cache_mb at mount time X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=32cc01c42fc0fefaed58d22b4b1657f56e11f0fb;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: lustre: llite: error setting max_cache_mb at mount time The root cause is that when max_cache_mb conf parameter is applied, the client isn't connected to the OST yet so that sbi->ll_dt_exp is NULL. However, it's not necessary to shrink the cache memory in this case so success should be returned. Signed-off-by: Jinshan Xiong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3676 Reviewed-on: http://review.whamcloud.com/7194 Reviewed-by: Andreas Dilger Reviewed-by: Bobi Jam Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c index 4a9f6693feba..501b93b82c06 100644 --- a/drivers/staging/lustre/lustre/llite/lproc_llite.c +++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c @@ -460,8 +460,8 @@ static ssize_t ll_max_cached_mb_seq_write(struct file *file, break; if (!sbi->ll_dt_exp) { /* being initialized */ - rc = -ENODEV; - break; + rc = 0; + goto out; } /* difficult - have to ask OSCs to drop LRU slots. */