On 2014年03月19日 05:43, Jacques, John M (John) wrote:
Build failure.

You guys are going to teach me to write comments yet!

Hi Charlie,

I think you might mis-understand Bruce for his comments,
in most situation, you had better go through your patch again
because we can get any useful information from your original
commit log.

Actually, build failure is not good for comments, and I think
there are many stuffs were missed for vmfs-self as well, like
Kconfig, and especially docs in Documentation/fs.

As for this patch, I think we can use __kuid_val/__kgid_val to
finish what your patch wants to do if I'm right here, cause it's
Linux style to avoid too much #ifdef in codes

Cheers,
Zumeng


-----Original Message-----
From: Bruce Ashfield [mailto:bruce.ashfi...@windriver.com]
Sent: Tuesday, March 18, 2014 4:32 PM
To: Charlie Paul; linux-yocto@yoctoproject.org
Cc: charlie.p...@windriver.com; Jacques, John M (John)
Subject: Re: [PATCH 12/57] arch/arm/mach-axxia: Updates to the VMFS File
System

Minor 'nit as well. What was the symptom when it was broken ? A build
failure ? runtime issue ? We should capture that in the commit message.

Bruce

On 14-03-18 12:56 AM, Charlie Paul wrote:
From: John Jacques <john.jacq...@lsi.com>

Updated to work when CONFIG_UIDGID_STRICT_TYPE_CHECKS is not
defined.
Signed-off-by: John Jacques <john.jacq...@lsi.com>
---
   fs/vmfs/inode.c |   18 ++++++++++++++++--
   fs/vmfs/ioctl.c |    8 ++++++++
   2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/fs/vmfs/inode.c b/fs/vmfs/inode.c index 713da0d..099bd76
100644
--- a/fs/vmfs/inode.c
+++ b/fs/vmfs/inode.c
@@ -486,11 +486,25 @@ int vmfs_notify_change(struct dentry *dentry,
struct iattr *attr)
                goto out;

        error = -EPERM;
-       if ((attr->ia_valid & ATTR_UID) && ((attr->ia_uid).val != (server-
mnt->uid).val))
+#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
+       if ((attr->ia_valid & ATTR_UID) &&
+           (attr->ia_uid.val != (server->mnt->uid).val))
                goto out;
+#else
+       if ((attr->ia_valid & ATTR_UID) &&
+           (attr->ia_uid != server->mnt->uid))
+               goto out;
+#endif

-       if ((attr->ia_valid & ATTR_GID) && ((attr->ia_gid).val != (server-
mnt->gid).val))
+#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
+       if ((attr->ia_valid & ATTR_GID) &&
+           ((attr->ia_gid).val != (server->mnt->gid).val))
                goto out;
+#else
+       if ((attr->ia_valid & ATTR_GID) &&
+           (attr->ia_gid != server->mnt->gid))
+               goto out;
+#endif

        if ((attr->ia_valid & ATTR_MODE) && (attr->ia_mode & ~mask))
                goto out;
diff --git a/fs/vmfs/ioctl.c b/fs/vmfs/ioctl.c index 988e69c..798df63
100644
--- a/fs/vmfs/ioctl.c
+++ b/fs/vmfs/ioctl.c
@@ -34,11 +34,19 @@ long vmfs_unlocked_ioctl(struct file *filp, unsigned
int cmd,
                uid16_t uid16;
                uid_t uid32;
        case VMFS_IOC_GETMOUNTUID:
+#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
                SET_UID(uid16, (server->mnt->mounted_uid).val);
+#else
+               SET_UID(uid16, server->mnt->mounted_uid); #endif
                result = put_user(uid16, (uid16_t __user *) arg);
                break;
        case VMFS_IOC_GETMOUNTUID32:
+#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
                SET_UID(uid32, (server->mnt->mounted_uid).val);
+#else
+               SET_UID(uid32, server->mnt->mounted_uid); #endif
                result = put_user(uid32, (uid_t __user *) arg);
                break;
        default:


--
_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to