]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: when renaming don't try to unlink negative dentry
authorJeff Layton <jlayton@redhat.com>
Fri, 17 Apr 2009 15:45:30 +0000 (11:45 -0400)
committerSteve French <sfrench@us.ibm.com>
Fri, 17 Apr 2009 21:08:15 +0000 (21:08 +0000)
commit859a626d95320437abf2505eda1f7b1c99f76a8f
tree86cccb6f28f84355d348bad27fa55d5c377d6660
parentb4b65d9c678d14b1810402555a638ab3d13235f5
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: Jeff Layton <jlayton@redhat.com>
Tested-by: Shirish Pargaonkar <shirishp@us.ibm.com>
CC: Stable <stable@vger.kernel.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/inode.c