diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /fs/ufs/ialloc.c | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'fs/ufs/ialloc.c')
-rw-r--r-- | fs/ufs/ialloc.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/fs/ufs/ialloc.c b/fs/ufs/ialloc.c index d0426d74817..2eabf04af3d 100644 --- a/fs/ufs/ialloc.c +++ b/fs/ufs/ialloc.c | |||
@@ -71,11 +71,11 @@ void ufs_free_inode (struct inode * inode) | |||
71 | 71 | ||
72 | ino = inode->i_ino; | 72 | ino = inode->i_ino; |
73 | 73 | ||
74 | mutex_lock(&UFS_SB(sb)->s_lock); | 74 | lock_super (sb); |
75 | 75 | ||
76 | if (!((ino > 1) && (ino < (uspi->s_ncg * uspi->s_ipg )))) { | 76 | if (!((ino > 1) && (ino < (uspi->s_ncg * uspi->s_ipg )))) { |
77 | ufs_warning(sb, "ufs_free_inode", "reserved inode or nonexistent inode %u\n", ino); | 77 | ufs_warning(sb, "ufs_free_inode", "reserved inode or nonexistent inode %u\n", ino); |
78 | mutex_unlock(&UFS_SB(sb)->s_lock); | 78 | unlock_super (sb); |
79 | return; | 79 | return; |
80 | } | 80 | } |
81 | 81 | ||
@@ -83,7 +83,7 @@ void ufs_free_inode (struct inode * inode) | |||
83 | bit = ufs_inotocgoff (ino); | 83 | bit = ufs_inotocgoff (ino); |
84 | ucpi = ufs_load_cylinder (sb, cg); | 84 | ucpi = ufs_load_cylinder (sb, cg); |
85 | if (!ucpi) { | 85 | if (!ucpi) { |
86 | mutex_unlock(&UFS_SB(sb)->s_lock); | 86 | unlock_super (sb); |
87 | return; | 87 | return; |
88 | } | 88 | } |
89 | ucg = ubh_get_ucg(UCPI_UBH(ucpi)); | 89 | ucg = ubh_get_ucg(UCPI_UBH(ucpi)); |
@@ -116,8 +116,8 @@ void ufs_free_inode (struct inode * inode) | |||
116 | if (sb->s_flags & MS_SYNCHRONOUS) | 116 | if (sb->s_flags & MS_SYNCHRONOUS) |
117 | ubh_sync_block(UCPI_UBH(ucpi)); | 117 | ubh_sync_block(UCPI_UBH(ucpi)); |
118 | 118 | ||
119 | ufs_mark_sb_dirty(sb); | 119 | sb->s_dirt = 1; |
120 | mutex_unlock(&UFS_SB(sb)->s_lock); | 120 | unlock_super (sb); |
121 | UFSD("EXIT\n"); | 121 | UFSD("EXIT\n"); |
122 | } | 122 | } |
123 | 123 | ||
@@ -170,7 +170,7 @@ static void ufs2_init_inodes_chunk(struct super_block *sb, | |||
170 | * For other inodes, search forward from the parent directory's block | 170 | * For other inodes, search forward from the parent directory's block |
171 | * group to find a free inode. | 171 | * group to find a free inode. |
172 | */ | 172 | */ |
173 | struct inode *ufs_new_inode(struct inode *dir, umode_t mode) | 173 | struct inode * ufs_new_inode(struct inode * dir, int mode) |
174 | { | 174 | { |
175 | struct super_block * sb; | 175 | struct super_block * sb; |
176 | struct ufs_sb_info * sbi; | 176 | struct ufs_sb_info * sbi; |
@@ -197,7 +197,7 @@ struct inode *ufs_new_inode(struct inode *dir, umode_t mode) | |||
197 | uspi = sbi->s_uspi; | 197 | uspi = sbi->s_uspi; |
198 | usb1 = ubh_get_usb_first(uspi); | 198 | usb1 = ubh_get_usb_first(uspi); |
199 | 199 | ||
200 | mutex_lock(&sbi->s_lock); | 200 | lock_super (sb); |
201 | 201 | ||
202 | /* | 202 | /* |
203 | * Try to place the inode in its parent directory | 203 | * Try to place the inode in its parent directory |
@@ -288,7 +288,7 @@ cg_found: | |||
288 | ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); | 288 | ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); |
289 | if (sb->s_flags & MS_SYNCHRONOUS) | 289 | if (sb->s_flags & MS_SYNCHRONOUS) |
290 | ubh_sync_block(UCPI_UBH(ucpi)); | 290 | ubh_sync_block(UCPI_UBH(ucpi)); |
291 | ufs_mark_sb_dirty(sb); | 291 | sb->s_dirt = 1; |
292 | 292 | ||
293 | inode->i_ino = cg * uspi->s_ipg + bit; | 293 | inode->i_ino = cg * uspi->s_ipg + bit; |
294 | inode_init_owner(inode, dir, mode); | 294 | inode_init_owner(inode, dir, mode); |
@@ -333,20 +333,20 @@ cg_found: | |||
333 | brelse(bh); | 333 | brelse(bh); |
334 | } | 334 | } |
335 | 335 | ||
336 | mutex_unlock(&sbi->s_lock); | 336 | unlock_super (sb); |
337 | 337 | ||
338 | UFSD("allocating inode %lu\n", inode->i_ino); | 338 | UFSD("allocating inode %lu\n", inode->i_ino); |
339 | UFSD("EXIT\n"); | 339 | UFSD("EXIT\n"); |
340 | return inode; | 340 | return inode; |
341 | 341 | ||
342 | fail_remove_inode: | 342 | fail_remove_inode: |
343 | mutex_unlock(&sbi->s_lock); | 343 | unlock_super(sb); |
344 | clear_nlink(inode); | 344 | inode->i_nlink = 0; |
345 | iput(inode); | 345 | iput(inode); |
346 | UFSD("EXIT (FAILED): err %d\n", err); | 346 | UFSD("EXIT (FAILED): err %d\n", err); |
347 | return ERR_PTR(err); | 347 | return ERR_PTR(err); |
348 | failed: | 348 | failed: |
349 | mutex_unlock(&sbi->s_lock); | 349 | unlock_super (sb); |
350 | make_bad_inode(inode); | 350 | make_bad_inode(inode); |
351 | iput (inode); | 351 | iput (inode); |
352 | UFSD("EXIT (FAILED): err %d\n", err); | 352 | UFSD("EXIT (FAILED): err %d\n", err); |