cifs: when renaming don't try to unlink negative dentry
When attempting to rename a file on a read-only share, the kernel can call cifs_unlink on a negative dentry, which causes an oops. Only try to unlink the file if it's a positive dentry. Signed-off-by: NJeff Layton <jlayton@redhat.com> Tested-by: NShirish Pargaonkar <shirishp@us.ibm.com> CC: Stable <stable@vger.kernel.org> Signed-off-by: NSteve French <sfrench@us.ibm.com>
Showing
想要评论请 注册 或 登录