1

cifs: print more detail when invalidate_inode_mapping fails

We had seen cases where cifs_invalidate_mapping was logging:
   "Could not invalidate inode ..."
if invalidate_inode_pages2 fails but this message does not show what
the rc is.  Update the logged message to also log the return code.

Suggested-by: Shyam Prasad N <sprasad@microsoft.com>
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
Steve French 2023-06-19 20:45:33 -05:00
parent 12c30f33cc
commit acf35d79ee

View File

@ -2344,8 +2344,8 @@ cifs_invalidate_mapping(struct inode *inode)
if (inode->i_mapping && inode->i_mapping->nrpages != 0) {
rc = invalidate_inode_pages2(inode->i_mapping);
if (rc)
cifs_dbg(VFS, "%s: Could not invalidate inode %p\n",
__func__, inode);
cifs_dbg(VFS, "%s: invalidate inode %p failed with rc %d\n",
__func__, inode, rc);
}
return rc;