From: Jinshan Xiong <jinshan.xi...@intel.com> 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.
Lustre-change: http://review.whamcloud.com/7194 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3676 Signed-off-by: Jinshan Xiong <jinshan.xi...@intel.com> Reviewed-by: Andreas Dilger <andreas.dil...@intel.com> Reviewed-by: Bobi Jam <bobi...@gmail.com> Signed-off-by: Peng Tao <bergw...@gmail.com> Signed-off-by: Andreas Dilger <andreas.dil...@intel.com> --- drivers/staging/lustre/lustre/llite/lproc_llite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c index 18a5998c..17d3911 100644 --- a/drivers/staging/lustre/lustre/llite/lproc_llite.c +++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c @@ -393,8 +393,8 @@ static ssize_t ll_max_cached_mb_seq_write(struct file *file, const char *buffer, return -ERANGE; } - if (sbi->ll_dt_exp == NULL) - return -ENODEV; + if (sbi->ll_dt_exp == NULL) /* being initialized */ + GOTO(out, rc = 0); spin_lock(&sbi->ll_lock); diff = pages_number - cache->ccc_lru_max; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/