diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-06-16 12:08:13 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-06-16 12:08:13 -0400 |
commit | f1bbbb6912662b9f6070c5bfc4ca9eb1f06a9d5b (patch) | |
tree | c2c130a74be25b0b2dff992e1a195e2728bdaadd /fs/ufs/ialloc.c | |
parent | fd0961ff67727482bb20ca7e8ea97b83e9de2ddb (diff) | |
parent | 7e27d6e778cd87b6f2415515d7127eba53fe5d02 (diff) |
Merge branch 'master' into for-next
Diffstat (limited to 'fs/ufs/ialloc.c')
-rw-r--r-- | fs/ufs/ialloc.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/fs/ufs/ialloc.c b/fs/ufs/ialloc.c index 230ecf608026..594480e537d2 100644 --- a/fs/ufs/ialloc.c +++ b/fs/ufs/ialloc.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/time.h> | 27 | #include <linux/time.h> |
28 | #include <linux/stat.h> | 28 | #include <linux/stat.h> |
29 | #include <linux/string.h> | 29 | #include <linux/string.h> |
30 | #include <linux/quotaops.h> | ||
31 | #include <linux/buffer_head.h> | 30 | #include <linux/buffer_head.h> |
32 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
33 | #include <linux/bitops.h> | 32 | #include <linux/bitops.h> |
@@ -95,9 +94,6 @@ void ufs_free_inode (struct inode * inode) | |||
95 | 94 | ||
96 | is_directory = S_ISDIR(inode->i_mode); | 95 | is_directory = S_ISDIR(inode->i_mode); |
97 | 96 | ||
98 | dquot_free_inode(inode); | ||
99 | dquot_drop(inode); | ||
100 | |||
101 | clear_inode (inode); | 97 | clear_inode (inode); |
102 | 98 | ||
103 | if (ubh_isclr (UCPI_UBH(ucpi), ucpi->c_iusedoff, bit)) | 99 | if (ubh_isclr (UCPI_UBH(ucpi), ucpi->c_iusedoff, bit)) |
@@ -303,15 +299,7 @@ cg_found: | |||
303 | sb->s_dirt = 1; | 299 | sb->s_dirt = 1; |
304 | 300 | ||
305 | inode->i_ino = cg * uspi->s_ipg + bit; | 301 | inode->i_ino = cg * uspi->s_ipg + bit; |
306 | inode->i_mode = mode; | 302 | inode_init_owner(inode, dir, mode); |
307 | inode->i_uid = current_fsuid(); | ||
308 | if (dir->i_mode & S_ISGID) { | ||
309 | inode->i_gid = dir->i_gid; | ||
310 | if (S_ISDIR(mode)) | ||
311 | inode->i_mode |= S_ISGID; | ||
312 | } else | ||
313 | inode->i_gid = current_fsgid(); | ||
314 | |||
315 | inode->i_blocks = 0; | 303 | inode->i_blocks = 0; |
316 | inode->i_generation = 0; | 304 | inode->i_generation = 0; |
317 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; | 305 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; |
@@ -355,21 +343,12 @@ cg_found: | |||
355 | 343 | ||
356 | unlock_super (sb); | 344 | unlock_super (sb); |
357 | 345 | ||
358 | dquot_initialize(inode); | ||
359 | err = dquot_alloc_inode(inode); | ||
360 | if (err) { | ||
361 | dquot_drop(inode); | ||
362 | goto fail_without_unlock; | ||
363 | } | ||
364 | |||
365 | UFSD("allocating inode %lu\n", inode->i_ino); | 346 | UFSD("allocating inode %lu\n", inode->i_ino); |
366 | UFSD("EXIT\n"); | 347 | UFSD("EXIT\n"); |
367 | return inode; | 348 | return inode; |
368 | 349 | ||
369 | fail_remove_inode: | 350 | fail_remove_inode: |
370 | unlock_super(sb); | 351 | unlock_super(sb); |
371 | fail_without_unlock: | ||
372 | inode->i_flags |= S_NOQUOTA; | ||
373 | inode->i_nlink = 0; | 352 | inode->i_nlink = 0; |
374 | iput(inode); | 353 | iput(inode); |
375 | UFSD("EXIT (FAILED): err %d\n", err); | 354 | UFSD("EXIT (FAILED): err %d\n", err); |