summaryrefslogtreecommitdiff
path: root/colorize.h
blob: 928deb2c9fe1b4feab254ca02e95e2837c6cda48 (plain)
1
2
3
4
5
6
7
8
#ifndef COLORIZE_H
#define COLORIZE_H

#define colorize_start(fore)		"\033[" __##fore "m"
#define colorize_start_full(fore, back)	"\033[" __##fore ";" __on_##back "m"
#define colorize_end()			"\033[" __reset "m"

#endif /* COLORIZE_H */
lue='0' selected='selected'>includemode:
authorMiklos Szeredi <mszeredi@redhat.com>2016-05-11 01:16:37 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2016-05-10 23:55:43 -0400
commit9409e22acdfc9153f88d9b1ed2bd2a5b34d2d3ca (patch)
tree94f5f543f75ed4080b99483242ef7622c97d6f54
parent54d5ca871e72f2bb172ec9323497f01cd5091ec7 (diff)
vfs: rename: check backing inode being equal
If a file is renamed to a hardlink of itself POSIX specifies that rename(2) should do nothing and return success. This condition is checked in vfs_rename(). However it won't detect hard links on overlayfs where these are given separate inodes on the overlayfs layer. Overlayfs itself detects this condition and returns success without doing anything, but then vfs_rename() will proceed as if this was a successful rename (detach_mounts(), d_move()). The correct thing to do is to detect this condition before even calling into overlayfs. This patch does this by calling vfs_select_inode() to get the underlying inodes. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Cc: <stable@vger.kernel.org> # v4.2+
Diffstat