diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-16 10:58:12 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-16 10:58:12 -0800 |
commit | ff0f962ca3c38239b299a70e7eea27abfbb979c3 (patch) | |
tree | ab37876cf2e8af4900f11f44ac4b96cb0f15e548 /fs/namei.c | |
parent | 087a76d390cbb8c0d21ea0cb3672ab4a7bb76362 (diff) | |
parent | c3c8699664800a68600f1988302173067eaeaffa (diff) | |
download | linux-ff0f962ca3c38239b299a70e7eea27abfbb979c3.tar.bz2 |
Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs
Pull overlayfs updates from Miklos Szeredi:
"This update contains:
- try to clone on copy-up
- allow renaming a directory
- split source into managable chunks
- misc cleanups and fixes
It does not contain the read-only fd data inconsistency fix, which Al
didn't like. I'll leave that to the next year..."
* 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: (36 commits)
ovl: fix reStructuredText syntax errors in documentation
ovl: fix return value of ovl_fill_super
ovl: clean up kstat usage
ovl: fold ovl_copy_up_truncate() into ovl_copy_up()
ovl: create directories inside merged parent opaque
ovl: opaque cleanup
ovl: show redirect_dir mount option
ovl: allow setting max size of redirect
ovl: allow redirect_dir to default to "on"
ovl: check for emptiness of redirect dir
ovl: redirect on rename-dir
ovl: lookup redirects
ovl: consolidate lookup for underlying layers
ovl: fix nested overlayfs mount
ovl: check namelen
ovl: split super.c
ovl: use d_is_dir()
ovl: simplify lookup
ovl: check lower existence of rename target
ovl: rename: simplify handling of lower/merged directory
...
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/namei.c b/fs/namei.c index 092ac5667ec7..2b55ea142273 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -4306,11 +4306,7 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry, bool new_is_dir = false; unsigned max_links = new_dir->i_sb->s_max_links; - /* - * Check source == target. - * On overlayfs need to look at underlying inodes. - */ - if (d_real_inode(old_dentry) == d_real_inode(new_dentry)) + if (source == target) return 0; error = may_delete(old_dir, old_dentry, is_dir); |