X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=fs%2Fceph%2Fdir.c;h=cef8252af38aed3e241d31092cbf9b46e8f05dbf;hb=1cd66c93ba8cdb873258f58ae6a817b28a02bcc3;hp=df4b3e6fa56398d248d51e0b6215a1773dacc1ec;hpb=e0e0be8a835520e2f7c89f214dfda570922a1b90;p=mirror_ubuntu-bionic-kernel.git diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index df4b3e6fa563..cef8252af38a 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -1061,7 +1061,8 @@ out: } static int ceph_rename(struct inode *old_dir, struct dentry *old_dentry, - struct inode *new_dir, struct dentry *new_dentry) + struct inode *new_dir, struct dentry *new_dentry, + unsigned int flags) { struct ceph_fs_client *fsc = ceph_sb_to_client(old_dir->i_sb); struct ceph_mds_client *mdsc = fsc->mdsc; @@ -1069,6 +1070,9 @@ static int ceph_rename(struct inode *old_dir, struct dentry *old_dentry, int op = CEPH_MDS_OP_RENAME; int err; + if (flags) + return -EINVAL; + if (ceph_snap(old_dir) != ceph_snap(new_dir)) return -EXDEV; if (ceph_snap(old_dir) != CEPH_NOSNAP) { @@ -1498,7 +1502,7 @@ const struct inode_operations ceph_dir_iops = { .link = ceph_link, .unlink = ceph_unlink, .rmdir = ceph_unlink, - .rename = ceph_rename, + .rename2 = ceph_rename, .create = ceph_create, .atomic_open = ceph_atomic_open, }; @@ -1509,7 +1513,7 @@ const struct inode_operations ceph_snapdir_iops = { .getattr = ceph_getattr, .mkdir = ceph_mkdir, .rmdir = ceph_unlink, - .rename = ceph_rename, + .rename2 = ceph_rename, }; const struct dentry_operations ceph_dentry_ops = {