Move the WARN_ONCE() about mvdown after the capability check. Signed-off-by: Ben Hutchings <[email protected]> --- This is compile-tested only.
Ben.
fs/aufs/ioctl.c | 1 -
fs/aufs/mvdown.c | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/aufs/ioctl.c b/fs/aufs/ioctl.c
index 628d627..1ac7688 100644
--- a/fs/aufs/ioctl.c
+++ b/fs/aufs/ioctl.c
@@ -152,7 +152,6 @@ long aufs_ioctl_nondir(struct file *file, unsigned int cmd,
unsigned long arg)
switch (cmd) {
case AUFS_CTL_MVDOWN:
- WARN_ONCE(1, "move-down is still testing...\n");
err = au_mvdown(file->f_dentry, (void __user *)arg);
break;
diff --git a/fs/aufs/mvdown.c b/fs/aufs/mvdown.c
index e68002e..5f56645 100644
--- a/fs/aufs/mvdown.c
+++ b/fs/aufs/mvdown.c
@@ -489,6 +489,8 @@ int au_mvdown(struct dentry *dentry, struct aufs_mvdown
__user *uarg)
if (unlikely(!capable(CAP_SYS_ADMIN)))
goto out;
+ WARN_ONCE(1, "move-down is still testing...\n");
+
err = -ENOMEM;
args = kmalloc(sizeof(*args), GFP_NOFS);
if (unlikely(!args))
--
Ben Hutchings
If God had intended Man to program,
we'd have been born with serial I/O ports.
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
