cifs: print more detail when invalidate_inode_mapping fails
authorSteve French <stfrench@microsoft.com>
Tue, 20 Jun 2023 01:45:33 +0000 (20:45 -0500)
committerSteve French <stfrench@microsoft.com>
Wed, 21 Jun 2023 04:03:03 +0000 (23:03 -0500)
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>
fs/smb/client/inode.c

index 1087ac6104a970a1cc426f55ec5d930424be028d..c3eeae07e1390e48e40fc988f18b4defb5356ff5 100644 (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;