diff options
Diffstat (limited to 'fs/udf/ialloc.c')
-rw-r--r-- | fs/udf/ialloc.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/udf/ialloc.c b/fs/udf/ialloc.c index c3fb28eee64..eb9cfa23dc3 100644 --- a/fs/udf/ialloc.c +++ b/fs/udf/ialloc.c | |||
@@ -46,11 +46,9 @@ void udf_free_inode(struct inode *inode) | |||
46 | struct logicalVolIntegrityDescImpUse *lvidiu = | 46 | struct logicalVolIntegrityDescImpUse *lvidiu = |
47 | udf_sb_lvidiu(sbi); | 47 | udf_sb_lvidiu(sbi); |
48 | if (S_ISDIR(inode->i_mode)) | 48 | if (S_ISDIR(inode->i_mode)) |
49 | lvidiu->numDirs = | 49 | le32_add_cpu(&lvidiu->numDirs, -1); |
50 | cpu_to_le32(le32_to_cpu(lvidiu->numDirs) - 1); | ||
51 | else | 50 | else |
52 | lvidiu->numFiles = | 51 | le32_add_cpu(&lvidiu->numFiles, -1); |
53 | cpu_to_le32(le32_to_cpu(lvidiu->numFiles) - 1); | ||
54 | 52 | ||
55 | mark_buffer_dirty(sbi->s_lvid_bh); | 53 | mark_buffer_dirty(sbi->s_lvid_bh); |
56 | } | 54 | } |
@@ -104,11 +102,9 @@ struct inode *udf_new_inode(struct inode *dir, int mode, int *err) | |||
104 | lvhd = (struct logicalVolHeaderDesc *) | 102 | lvhd = (struct logicalVolHeaderDesc *) |
105 | (lvid->logicalVolContentsUse); | 103 | (lvid->logicalVolContentsUse); |
106 | if (S_ISDIR(mode)) | 104 | if (S_ISDIR(mode)) |
107 | lvidiu->numDirs = | 105 | le32_add_cpu(&lvidiu->numDirs, 1); |
108 | cpu_to_le32(le32_to_cpu(lvidiu->numDirs) + 1); | ||
109 | else | 106 | else |
110 | lvidiu->numFiles = | 107 | le32_add_cpu(&lvidiu->numFiles, 1); |
111 | cpu_to_le32(le32_to_cpu(lvidiu->numFiles) + 1); | ||
112 | iinfo->i_unique = uniqueID = le64_to_cpu(lvhd->uniqueID); | 108 | iinfo->i_unique = uniqueID = le64_to_cpu(lvhd->uniqueID); |
113 | if (!(++uniqueID & 0x00000000FFFFFFFFUL)) | 109 | if (!(++uniqueID & 0x00000000FFFFFFFFUL)) |
114 | uniqueID += 16; | 110 | uniqueID += 16; |