diff --git a/fs/lustre/llite/file.c b/fs/lustre/llite/file.c index 68fb623..ae39b2c 100644 --- a/fs/lustre/llite/file.c +++ b/fs/lustre/llite/file.c @@ -496,6 +496,13 @@ void ll_dom_finish_open(struct inode *inode, struct ptlrpc_request *req, break; } lock_page(vmpage); + if (!vmpage->mapping) { + unlock_page(vmpage); + put_page(vmpage); + /* page was truncated */ + rc = -ENODATA; + goto out_io; + } clp = cl_page_find(env, obj, vmpage->index, vmpage, CPT_CACHEABLE); if (IS_ERR(clp)) {