aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-04 17:03:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-04 17:03:05 -0400
commit7df934526c0b3775613502dcd19ab6d2da8cce1e (patch)
tree01e6a4ea20c676228f4acefc6ae776d2e52072db /drivers/staging
parent3c83e61e67256e0bb08c46cc2db43b58fd617251 (diff)
parentbd42998a6bcb9b1708dac9ca9876e3d304c16f3d (diff)
Merge branch 'cross-rename' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs
Pull renameat2 system call from Miklos Szeredi: "This adds a new syscall, renameat2(), which is the same as renameat() but with a flags argument. The purpose of extending rename is to add cross-rename, a symmetric variant of rename, which exchanges the two files. This allows interesting things, which were not possible before, for example atomically replacing a directory tree with a symlink, etc... This also allows overlayfs and friends to operate on whiteouts atomically. Andy Lutomirski also suggested a "noreplace" flag, which disables the overwriting behavior of rename. These two flags, RENAME_EXCHANGE and RENAME_NOREPLACE are only implemented for ext4 as an example and for testing" * 'cross-rename' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ext4: add cross rename support ext4: rename: split out helper functions ext4: rename: move EMLINK check up ext4: rename: create ext4_renament structure for local vars vfs: add cross-rename vfs: lock_two_nondirectories: allow directory args security: add flags to rename hooks vfs: add RENAME_NOREPLACE flag vfs: add renameat2 syscall vfs: rename: use common code for dir and non-dir vfs: rename: move d_move() up vfs: add d_is_dir()
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/lustre/lustre/include/linux/lustre_compat25.h4
-rw-r--r--drivers/staging/lustre/lustre/lvfs/lvfs_linux.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
index eefdb8d061b1..81cc7a0134bb 100644
--- a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
+++ b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
@@ -105,8 +105,8 @@ static inline void ll_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt,
105#define ll_vfs_unlink(inode,entry,mnt) vfs_unlink(inode,entry) 105#define ll_vfs_unlink(inode,entry,mnt) vfs_unlink(inode,entry)
106#define ll_vfs_mknod(dir,entry,mnt,mode,dev) vfs_mknod(dir,entry,mode,dev) 106#define ll_vfs_mknod(dir,entry,mnt,mode,dev) vfs_mknod(dir,entry,mode,dev)
107#define ll_security_inode_unlink(dir,entry,mnt) security_inode_unlink(dir,entry) 107#define ll_security_inode_unlink(dir,entry,mnt) security_inode_unlink(dir,entry)
108#define ll_vfs_rename(old,old_dir,mnt,new,new_dir,mnt1,delegated_inode) \ 108#define ll_vfs_rename(old, old_dir, mnt, new, new_dir, mnt1) \
109 vfs_rename(old,old_dir,new,new_dir,delegated_inode) 109 vfs_rename(old, old_dir, new, new_dir, NULL, 0)
110 110
111#define cfs_bio_io_error(a,b) bio_io_error((a)) 111#define cfs_bio_io_error(a,b) bio_io_error((a))
112#define cfs_bio_endio(a,b,c) bio_endio((a),(c)) 112#define cfs_bio_endio(a,b,c) bio_endio((a),(c))
diff --git a/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c b/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c
index e44b7a532de7..374a9b78e1d2 100644
--- a/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c
+++ b/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c
@@ -223,7 +223,7 @@ int lustre_rename(struct dentry *dir, struct vfsmount *mnt,
223 GOTO(put_old, err = PTR_ERR(dchild_new)); 223 GOTO(put_old, err = PTR_ERR(dchild_new));
224 224
225 err = ll_vfs_rename(dir->d_inode, dchild_old, mnt, 225 err = ll_vfs_rename(dir->d_inode, dchild_old, mnt,
226 dir->d_inode, dchild_new, mnt, NULL); 226 dir->d_inode, dchild_new, mnt);
227 227
228 dput(dchild_new); 228 dput(dchild_new);
229put_old: 229put_old: