diff mbox

[1/2,linux-next] gfs2: check rename2 flags at once

Message ID 20170503182746.20076-1-fabf@skynet.be (mailing list archive)
State New, archived
Headers show

Commit Message

Fabian Frederick May 3, 2017, 6:27 p.m. UTC
There's no need to update flags in gfs2_rename2()
This will ease whiteout addition.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 fs/gfs2/inode.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Bob Peterson May 4, 2017, 1:28 p.m. UTC | #1
----- Original Message -----
| There's no need to update flags in gfs2_rename2()
| This will ease whiteout addition.
| 
| Signed-off-by: Fabian Frederick <fabf@skynet.be>
| ---

Hi Fabian,

Your patches look good. I'll push them to the for-next branch of our
repo after the merge window is closed.

Regards,

Bob Peterson
Red Hat File Systems
diff mbox

Patch

diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 9f605ea..9698796 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -1706,9 +1706,7 @@  static int gfs2_rename2(struct inode *odir, struct dentry *odentry,
 			struct inode *ndir, struct dentry *ndentry,
 			unsigned int flags)
 {
-	flags &= ~RENAME_NOREPLACE;
-
-	if (flags & ~RENAME_EXCHANGE)
+	if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE))
 		return -EINVAL;
 
 	if (flags & RENAME_EXCHANGE)