Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=39058a0e12a8b2dcb8f9345ecad52dbcfc120ef7
Commit:     39058a0e12a8b2dcb8f9345ecad52dbcfc120ef7
Parent:     4cf3b52080b3d354b10b8b1c9147bf88118b8eef
Author:     Eric Sandeen <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 10 18:37:10 2007 +1100
Committer:  Tim Shimmin <[EMAIL PROTECTED]>
CommitDate: Sat Feb 10 18:37:10 2007 +1100

    [XFS] Clean up use of VFS attr flags
    
    Use the the generic VFS attr flags where appropriate instead of open
    coding them to the same values.
    
    Patch provided by Eric Sandeen.
    
    SGI-PV: 960868
    SGI-Modid: xfs-linux-melb:xfs-kern:28033a
    
    Signed-off-by: Eric Sandeen <[EMAIL PROTECTED]>
    Signed-off-by: David Chinner <[EMAIL PROTECTED]>
    Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]>
    Signed-off-by: Tim Shimmin <[EMAIL PROTECTED]>
---
 fs/xfs/linux-2.6/xfs_ioctl.c |   31 +++++++++++++------------------
 1 files changed, 13 insertions(+), 18 deletions(-)

diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c
index 59b5c9b..e9d920d 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl.c
@@ -1090,11 +1090,6 @@ xfs_ioc_fsgeometry(
 /*
  * Linux extended inode flags interface.
  */
-#define LINUX_XFLAG_SYNC       0x00000008 /* Synchronous updates */
-#define LINUX_XFLAG_IMMUTABLE  0x00000010 /* Immutable file */
-#define LINUX_XFLAG_APPEND     0x00000020 /* writes to file may only append */
-#define LINUX_XFLAG_NODUMP     0x00000040 /* do not dump file */
-#define LINUX_XFLAG_NOATIME    0x00000080 /* do not update atime */
 
 STATIC unsigned int
 xfs_merge_ioc_xflags(
@@ -1103,23 +1098,23 @@ xfs_merge_ioc_xflags(
 {
        unsigned int    xflags = start;
 
-       if (flags & LINUX_XFLAG_IMMUTABLE)
+       if (flags & FS_IMMUTABLE_FL)
                xflags |= XFS_XFLAG_IMMUTABLE;
        else
                xflags &= ~XFS_XFLAG_IMMUTABLE;
-       if (flags & LINUX_XFLAG_APPEND)
+       if (flags & FS_APPEND_FL)
                xflags |= XFS_XFLAG_APPEND;
        else
                xflags &= ~XFS_XFLAG_APPEND;
-       if (flags & LINUX_XFLAG_SYNC)
+       if (flags & FS_SYNC_FL)
                xflags |= XFS_XFLAG_SYNC;
        else
                xflags &= ~XFS_XFLAG_SYNC;
-       if (flags & LINUX_XFLAG_NOATIME)
+       if (flags & FS_NOATIME_FL)
                xflags |= XFS_XFLAG_NOATIME;
        else
                xflags &= ~XFS_XFLAG_NOATIME;
-       if (flags & LINUX_XFLAG_NODUMP)
+       if (flags & FS_NODUMP_FL)
                xflags |= XFS_XFLAG_NODUMP;
        else
                xflags &= ~XFS_XFLAG_NODUMP;
@@ -1134,15 +1129,15 @@ xfs_di2lxflags(
        unsigned int    flags = 0;
 
        if (di_flags & XFS_DIFLAG_IMMUTABLE)
-               flags |= LINUX_XFLAG_IMMUTABLE;
+               flags |= FS_IMMUTABLE_FL;
        if (di_flags & XFS_DIFLAG_APPEND)
-               flags |= LINUX_XFLAG_APPEND;
+               flags |= FS_APPEND_FL;
        if (di_flags & XFS_DIFLAG_SYNC)
-               flags |= LINUX_XFLAG_SYNC;
+               flags |= FS_SYNC_FL;
        if (di_flags & XFS_DIFLAG_NOATIME)
-               flags |= LINUX_XFLAG_NOATIME;
+               flags |= FS_NOATIME_FL;
        if (di_flags & XFS_DIFLAG_NODUMP)
-               flags |= LINUX_XFLAG_NODUMP;
+               flags |= FS_NODUMP_FL;
        return flags;
 }
 
@@ -1242,9 +1237,9 @@ xfs_ioc_xattr(
                        break;
                }
 
-               if (flags & ~(LINUX_XFLAG_IMMUTABLE | LINUX_XFLAG_APPEND | \
-                             LINUX_XFLAG_NOATIME | LINUX_XFLAG_NODUMP | \
-                             LINUX_XFLAG_SYNC)) {
+               if (flags & ~(FS_IMMUTABLE_FL | FS_APPEND_FL | \
+                             FS_NOATIME_FL | FS_NODUMP_FL | \
+                             FS_SYNC_FL)) {
                        error = -EOPNOTSUPP;
                        break;
                }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to