diff --git a/[refs] b/[refs] index 3bca0eb6b8e0..66a494ce9c1d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 11b0b5abb2097a63c1081d9b7e825b987b227972 +refs/heads/master: 0e6b3e5e97e2e8a25bcfc528dad94edf5220dfeb diff --git a/trunk/Documentation/filesystems/udf.txt b/trunk/Documentation/filesystems/udf.txt index e5213bc301f7..511b4230c053 100644 --- a/trunk/Documentation/filesystems/udf.txt +++ b/trunk/Documentation/filesystems/udf.txt @@ -26,6 +26,20 @@ The following mount options are supported: nostrict Unset strict conformance iocharset= Set the NLS character set +The uid= and gid= options need a bit more explaining. They will accept a +decimal numeric value which will be used as the default ID for that mount. +They will also accept the string "ignore" and "forget". For files on the disk +that are owned by nobody ( -1 ), they will instead look as if they are owned +by the default ID. The ignore option causes the default ID to override all +IDs on the disk, not just -1. The forget option causes all IDs to be written +to disk as -1, so when the media is later remounted, they will appear to be +owned by whatever default ID it is mounted with at that time. + +For typical desktop use of removable media, you should set the ID to that +of the interactively logged on user, and also specify both the forget and +ignore options. This way the interactive user will always see the files +on the disk as belonging to him. + The remaining are for debugging and disaster recovery: novrs Skip volume sequence recognition diff --git a/trunk/fs/udf/inode.c b/trunk/fs/udf/inode.c index d04cff2273b6..81e0e8459af1 100644 --- a/trunk/fs/udf/inode.c +++ b/trunk/fs/udf/inode.c @@ -1341,13 +1341,11 @@ udf_update_inode(struct inode *inode, int do_sync) if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_UID_FORGET)) fe->uid = cpu_to_le32(-1); - else if (inode->i_uid != UDF_SB(inode->i_sb)->s_uid) - fe->uid = cpu_to_le32(inode->i_uid); + else fe->uid = cpu_to_le32(inode->i_uid); if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_GID_FORGET)) fe->gid = cpu_to_le32(-1); - else if (inode->i_gid != UDF_SB(inode->i_sb)->s_gid) - fe->gid = cpu_to_le32(inode->i_gid); + else fe->gid = cpu_to_le32(inode->i_gid); udfperms = ((inode->i_mode & S_IRWXO) ) | ((inode->i_mode & S_IRWXG) << 2) |