diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2006-09-21 19:51:28 -0400 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2006-09-24 16:50:45 -0400 |
commit | 0027dd5bc213bc639e09dd002a4ab56bd18317c3 (patch) | |
tree | b41612706b25e8be6aa22f8423cc92a95a2337dc /fs/ocfs2/namei.c | |
parent | 1ba9da2ffa54b56a6346746248bfa38124d499a6 (diff) |
ocfs2: Remove special casing for inode creation in ocfs2_dentry_attach_lock()
We can't use LKM_LOCAL for new dentry locks because an unlink and subsequent
re-create of a name/inode pair may result in the lock still being mastered
somewhere in the cluster.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/namei.c')
-rw-r--r-- | fs/ocfs2/namei.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 5a942e0123ea..6fa978874c33 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c | |||
@@ -217,7 +217,7 @@ bail_add: | |||
217 | dentry = ret; | 217 | dentry = ret; |
218 | 218 | ||
219 | status = ocfs2_dentry_attach_lock(dentry, inode, | 219 | status = ocfs2_dentry_attach_lock(dentry, inode, |
220 | OCFS2_I(dir)->ip_blkno, 0); | 220 | OCFS2_I(dir)->ip_blkno); |
221 | if (status) { | 221 | if (status) { |
222 | mlog_errno(status); | 222 | mlog_errno(status); |
223 | ret = ERR_PTR(status); | 223 | ret = ERR_PTR(status); |
@@ -441,7 +441,7 @@ static int ocfs2_mknod(struct inode *dir, | |||
441 | } | 441 | } |
442 | 442 | ||
443 | status = ocfs2_dentry_attach_lock(dentry, inode, | 443 | status = ocfs2_dentry_attach_lock(dentry, inode, |
444 | OCFS2_I(dir)->ip_blkno, 1); | 444 | OCFS2_I(dir)->ip_blkno); |
445 | if (status) { | 445 | if (status) { |
446 | mlog_errno(status); | 446 | mlog_errno(status); |
447 | goto leave; | 447 | goto leave; |
@@ -754,8 +754,7 @@ static int ocfs2_link(struct dentry *old_dentry, | |||
754 | goto bail; | 754 | goto bail; |
755 | } | 755 | } |
756 | 756 | ||
757 | err = ocfs2_dentry_attach_lock(dentry, inode, OCFS2_I(dir)->ip_blkno, | 757 | err = ocfs2_dentry_attach_lock(dentry, inode, OCFS2_I(dir)->ip_blkno); |
758 | 0); | ||
759 | if (err) { | 758 | if (err) { |
760 | mlog_errno(err); | 759 | mlog_errno(err); |
761 | goto bail; | 760 | goto bail; |
@@ -1716,8 +1715,7 @@ static int ocfs2_symlink(struct inode *dir, | |||
1716 | goto bail; | 1715 | goto bail; |
1717 | } | 1716 | } |
1718 | 1717 | ||
1719 | status = ocfs2_dentry_attach_lock(dentry, inode, | 1718 | status = ocfs2_dentry_attach_lock(dentry, inode, OCFS2_I(dir)->ip_blkno); |
1720 | OCFS2_I(dir)->ip_blkno, 1); | ||
1721 | if (status) { | 1719 | if (status) { |
1722 | mlog_errno(status); | 1720 | mlog_errno(status); |
1723 | goto bail; | 1721 | goto bail; |