linux_dsm_epyc7002/fs/cifs
Pavel Shilovsky a07d322059 CIFS: Fix directory rename error
CIFS servers process nlink counts differently for files and directories.
In cifs_rename() if we the request fails on the existing target, we
try to remove it through cifs_unlink() but this is not what we want
to do for directories. As the result the following sequence of commands

mkdir {1,2}; mv -T 1 2; rmdir {1,2}; mkdir {1,2}; echo foo > 2/bar

and XFS test generic/023 fail with -ENOENT error. That's why the second
mkdir reuses the existing inode (target inode of the mv -T command) with
S_DEAD flag.

Fix this by checking whether the target is directory or not and
calling cifs_rmdir() rather than cifs_unlink() for directories.

Cc: <stable@vger.kernel.org>
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
2014-08-22 00:26:56 -05:00
..
asn1.c
cache.c
cifs_debug.c [CIFS] Fix incorrect hex vs. decimal in some debug print statements 2014-08-02 21:16:48 -05:00
cifs_debug.h
cifs_dfs_ref.c
cifs_fs_sb.h
cifs_spnego.c
cifs_spnego.h
cifs_unicode.c [CIFS] fix mount failure with broken pathnames when smb3 mount with mapchars option 2014-06-24 08:10:24 -05:00
cifs_unicode.h
cifs_uniupr.h
cifsacl.c
cifsacl.h
cifsencrypt.c
cifsfs.c Merge branch 'for-linus' of git://git.samba.org/sfrench/cifs-2.6 2014-08-20 18:33:21 -05:00
cifsfs.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-08-11 11:44:11 -07:00
cifsglob.h enable fallocate punch hole ("fallocate -p") for SMB3 2014-08-17 18:12:38 -05:00
cifspdu.h Add missing definitions for CIFS File System Attributes 2014-08-12 23:47:14 -05:00
cifsproto.h CIFS: Use multicredits for SMB 2.1/3 writes 2014-08-02 01:23:03 -05:00
cifssmb.c CIFS: Optimize cifs_user_read() in a short read case on reconnects 2014-08-02 01:23:04 -05:00
connect.c cifs: No need to send SIGKILL to demux_thread during umount 2014-08-22 00:20:58 -05:00
dir.c cifs: Allow directIO read/write during cache=strict 2014-08-22 00:20:39 -05:00
dns_resolve.c
dns_resolve.h
export.c
file.c cifs: Allow directIO read/write during cache=strict 2014-08-22 00:20:39 -05:00
fscache.c
fscache.h
inode.c CIFS: Fix directory rename error 2014-08-22 00:26:56 -05:00
ioctl.c fs: cifs: new helper: file_inode(file) 2014-05-21 10:18:05 -07:00
Kconfig
link.c fs/cifs: fix regression in cifs_create_mf_symlink() 2014-06-16 13:50:11 -05:00
Makefile
misc.c cifs: remove unused function cifs_oplock_break_wait 2014-08-11 01:31:03 -05:00
netmisc.c fs/cifs/netmisc.c: convert printk to pr_foo() 2014-05-21 10:18:05 -07:00
nterr.c
nterr.h
ntlmssp.h
readdir.c CIFS: Fix SMB2 readdir error handling 2014-08-17 05:08:39 -05:00
rfc1002pdu.h
sess.c cifs: fix a possible null pointer deref in decode_ascii_ssetup 2014-08-21 12:04:29 -05:00
smb1ops.c CIFS: Fix SMB2 readdir error handling 2014-08-17 05:08:39 -05:00
smb2file.c
smb2glob.h
smb2inode.c Add worker function to set allocation size 2014-08-05 12:53:37 -05:00
smb2maperror.c Incorrect error returned on setting file compressed on SMB2 2014-08-17 18:12:31 -05:00
smb2misc.c [CIFS] Workaround MacOS server problem with SMB2.1 write 2014-08-15 23:49:01 -05:00
smb2ops.c Trivial whitespace fix 2014-08-20 21:21:29 -05:00
smb2pdu.c cifs: remove unneeded check of null checking in if condition 2014-08-21 12:13:05 -05:00
smb2pdu.h enable fallocate punch hole ("fallocate -p") for SMB3 2014-08-17 18:12:38 -05:00
smb2proto.h Add worker function to set allocation size 2014-08-05 12:53:37 -05:00
smb2status.h
smb2transport.c CIFS: Use multicredits for SMB 2.1/3 writes 2014-08-02 01:23:03 -05:00
smbencrypt.c
smberr.h
smbfsctl.h enable fallocate punch hole ("fallocate -p") for SMB3 2014-08-17 18:12:38 -05:00
transport.c CIFS: Use multicredits for SMB 2.1/3 writes 2014-08-02 01:23:03 -05:00
winucase.c
xattr.c