diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-25 11:39:18 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-25 11:39:18 -0500 |
commit | e07dd2ad305f6b29b47d713600aa8b722ef2a9f7 (patch) | |
tree | 4815808e538ec625bf2766b1eb9d91c7b3beaead /fs/gfs2/ops_inode.c | |
parent | eba0e319c12fb098d66316a8eafbaaa9174a07c3 (diff) | |
parent | 7bc5c414fe6627ec518c82d154c796f0981f5b02 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: (56 commits)
[GFS2] Allow journal recovery on read-only mount
[GFS2] Lockup on error
[GFS2] Fix page_mkwrite truncation race path
[GFS2] Fix typo
[GFS2] Fix write alloc required shortcut calculation
[GFS2] gfs2_alloc_required performance
[GFS2] Remove unneeded i_spin
[GFS2] Reduce inode size by moving i_alloc out of line
[GFS2] Fix assert in log code
[GFS2] Fix problems relating to execution of files on GFS2
[GFS2] Initialize extent_list earlier
[GFS2] Allow page migration for writeback and ordered pages
[GFS2] Remove unused variable
[GFS2] Fix log block mapper
[GFS2] Minor correction
[GFS2] Eliminate the no longer needed sd_statfs_mutex
[GFS2] Incremental patch to fix compiler warning
[GFS2] Function meta_read optimization
[GFS2] Only fetch the dinode once in block_map
[GFS2] Reorganize function gfs2_glmutex_lock
...
Diffstat (limited to 'fs/gfs2/ops_inode.c')
-rw-r--r-- | fs/gfs2/ops_inode.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index 291f0c7eaa3b..9f71372c1757 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c | |||
@@ -61,7 +61,7 @@ static int gfs2_create(struct inode *dir, struct dentry *dentry, | |||
61 | inode = gfs2_createi(ghs, &dentry->d_name, S_IFREG | mode, 0); | 61 | inode = gfs2_createi(ghs, &dentry->d_name, S_IFREG | mode, 0); |
62 | if (!IS_ERR(inode)) { | 62 | if (!IS_ERR(inode)) { |
63 | gfs2_trans_end(sdp); | 63 | gfs2_trans_end(sdp); |
64 | if (dip->i_alloc.al_rgd) | 64 | if (dip->i_alloc->al_rgd) |
65 | gfs2_inplace_release(dip); | 65 | gfs2_inplace_release(dip); |
66 | gfs2_quota_unlock(dip); | 66 | gfs2_quota_unlock(dip); |
67 | gfs2_alloc_put(dip); | 67 | gfs2_alloc_put(dip); |
@@ -113,8 +113,18 @@ static struct dentry *gfs2_lookup(struct inode *dir, struct dentry *dentry, | |||
113 | if (inode && IS_ERR(inode)) | 113 | if (inode && IS_ERR(inode)) |
114 | return ERR_PTR(PTR_ERR(inode)); | 114 | return ERR_PTR(PTR_ERR(inode)); |
115 | 115 | ||
116 | if (inode) | 116 | if (inode) { |
117 | struct gfs2_glock *gl = GFS2_I(inode)->i_gl; | ||
118 | struct gfs2_holder gh; | ||
119 | int error; | ||
120 | error = gfs2_glock_nq_init(gl, LM_ST_SHARED, LM_FLAG_ANY, &gh); | ||
121 | if (error) { | ||
122 | iput(inode); | ||
123 | return ERR_PTR(error); | ||
124 | } | ||
125 | gfs2_glock_dq_uninit(&gh); | ||
117 | return d_splice_alias(inode, dentry); | 126 | return d_splice_alias(inode, dentry); |
127 | } | ||
118 | d_add(dentry, inode); | 128 | d_add(dentry, inode); |
119 | 129 | ||
120 | return NULL; | 130 | return NULL; |
@@ -366,7 +376,7 @@ static int gfs2_symlink(struct inode *dir, struct dentry *dentry, | |||
366 | } | 376 | } |
367 | 377 | ||
368 | gfs2_trans_end(sdp); | 378 | gfs2_trans_end(sdp); |
369 | if (dip->i_alloc.al_rgd) | 379 | if (dip->i_alloc->al_rgd) |
370 | gfs2_inplace_release(dip); | 380 | gfs2_inplace_release(dip); |
371 | gfs2_quota_unlock(dip); | 381 | gfs2_quota_unlock(dip); |
372 | gfs2_alloc_put(dip); | 382 | gfs2_alloc_put(dip); |
@@ -442,7 +452,7 @@ static int gfs2_mkdir(struct inode *dir, struct dentry *dentry, int mode) | |||
442 | gfs2_assert_withdraw(sdp, !error); /* dip already pinned */ | 452 | gfs2_assert_withdraw(sdp, !error); /* dip already pinned */ |
443 | 453 | ||
444 | gfs2_trans_end(sdp); | 454 | gfs2_trans_end(sdp); |
445 | if (dip->i_alloc.al_rgd) | 455 | if (dip->i_alloc->al_rgd) |
446 | gfs2_inplace_release(dip); | 456 | gfs2_inplace_release(dip); |
447 | gfs2_quota_unlock(dip); | 457 | gfs2_quota_unlock(dip); |
448 | gfs2_alloc_put(dip); | 458 | gfs2_alloc_put(dip); |
@@ -548,7 +558,7 @@ static int gfs2_mknod(struct inode *dir, struct dentry *dentry, int mode, | |||
548 | } | 558 | } |
549 | 559 | ||
550 | gfs2_trans_end(sdp); | 560 | gfs2_trans_end(sdp); |
551 | if (dip->i_alloc.al_rgd) | 561 | if (dip->i_alloc->al_rgd) |
552 | gfs2_inplace_release(dip); | 562 | gfs2_inplace_release(dip); |
553 | gfs2_quota_unlock(dip); | 563 | gfs2_quota_unlock(dip); |
554 | gfs2_alloc_put(dip); | 564 | gfs2_alloc_put(dip); |