]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/udf/inode.c
Merge nommu tree
[linux-2.6-omap-h63xx.git] / fs / udf / inode.c
index b83890beaaacbec45e199c9cf8fc78599423ff07..81e0e8459af1159921b8b8f3f99e419b3e7869aa 100644 (file)
@@ -4,11 +4,6 @@
  * PURPOSE
  *  Inode handling routines for the OSTA-UDF(tm) filesystem.
  *
- * CONTACTS
- *  E-mail regarding any portion of the Linux UDF file system should be
- *  directed to the development team mailing list (run by majordomo):
- *    linux_udf@hpesjro.fc.hp.com
- *
  * COPYRIGHT
  *  This file is distributed under the terms of the GNU General Public
  *  License (GPL). Copies of the GPL can be obtained from:
@@ -1050,10 +1045,14 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
        }
 
        inode->i_uid = le32_to_cpu(fe->uid);
-       if ( inode->i_uid == -1 ) inode->i_uid = UDF_SB(inode->i_sb)->s_uid;
+       if (inode->i_uid == -1 || UDF_QUERY_FLAG(inode->i_sb,
+                                       UDF_FLAG_UID_IGNORE))
+               inode->i_uid = UDF_SB(inode->i_sb)->s_uid;
 
        inode->i_gid = le32_to_cpu(fe->gid);
-       if ( inode->i_gid == -1 ) inode->i_gid = UDF_SB(inode->i_sb)->s_gid;
+       if (inode->i_gid == -1 || UDF_QUERY_FLAG(inode->i_sb,
+                                       UDF_FLAG_GID_IGNORE))
+               inode->i_gid = UDF_SB(inode->i_sb)->s_gid;
 
        inode->i_nlink = le16_to_cpu(fe->fileLinkCount);
        if (!inode->i_nlink)
@@ -1340,11 +1339,13 @@ udf_update_inode(struct inode *inode, int do_sync)
                return err;
        }
 
-       if (inode->i_uid != UDF_SB(inode->i_sb)->s_uid)
-               fe->uid = cpu_to_le32(inode->i_uid);
+       if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_UID_FORGET))
+               fe->uid = cpu_to_le32(-1);
+       else fe->uid = cpu_to_le32(inode->i_uid);
 
-       if (inode->i_gid != UDF_SB(inode->i_sb)->s_gid)
-               fe->gid = cpu_to_le32(inode->i_gid);
+       if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_GID_FORGET))
+               fe->gid = cpu_to_le32(-1);
+       else fe->gid = cpu_to_le32(inode->i_gid);
 
        udfperms =      ((inode->i_mode & S_IRWXO)     ) |
                        ((inode->i_mode & S_IRWXG) << 2) |
@@ -1962,11 +1963,6 @@ int8_t inode_bmap(struct inode *inode, int block, kernel_lb_addr *bloc, uint32_t
                printk(KERN_ERR "udf: inode_bmap: block < 0\n");
                return -1;
        }
-       if (!inode)
-       {
-               printk(KERN_ERR "udf: inode_bmap: NULL inode\n");
-               return -1;
-       }
 
        *extoffset = 0;
        *elen = 0;