xfs: fix uflags detection at xfs_fs_rm_xquota [Linux 3.17]

This Linux kernel change "xfs: fix uflags detection at xfs_fs_rm_xquota" is included in the Linux 3.17 release. This change is authored by Jie Liu <jeff.liu [at] oracle.com> on Thu Jul 24 21:27:17 2014 +1000. The commit for this change in Linux stable tree is 74dc93a (patch).

xfs: fix uflags detection at xfs_fs_rm_xquota

We are intended to check up uflags against FS_PROJ_QUOTA rather than
FS_USER_UQUOTA once more, it looks to me like a typo, but might cause
the project quota metadata space can not be removed.

Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 fs/xfs/xfs_quotaops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_quotaops.c b/fs/xfs/xfs_quotaops.c
index 4f7aecb..b238027 100644
--- a/fs/xfs/xfs_quotaops.c
+++ b/fs/xfs/xfs_quotaops.c
@@ -123,7 +123,7 @@
        flags |= XFS_DQ_USER;
    if (uflags & FS_GROUP_QUOTA)
        flags |= XFS_DQ_GROUP;
-   if (uflags & FS_USER_QUOTA)
+   if (uflags & FS_PROJ_QUOTA)
        flags |= XFS_DQ_PROJ;

    return xfs_qm_scall_trunc_qfiles(mp, flags);

Leave a Reply

Your email address will not be published. Required fields are marked *