Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195741
b: refs/heads/master
c: 547ba7c
h: refs/heads/master
i:
  195739: 38d7239
v: v3
  • Loading branch information
Joel Becker committed May 10, 2010
1 parent c2d8055 commit a4c85d2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e4b963f10e9026c83419b5c25b93a0350413cf16
refs/heads/master: 547ba7c8efe43c2cabb38782e23572a6179dd1c1
21 changes: 21 additions & 0 deletions trunk/fs/ocfs2/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ static int ocfs2_mknod(struct inode *dir,
};
int did_quota_inode = 0;
struct ocfs2_dir_lookup_result lookup = { NULL, };
sigset_t oldset;
int did_block_signals = 0;

mlog_entry("(0x%p, 0x%p, %d, %lu, '%.*s')\n", dir, dentry, mode,
(unsigned long)dev, dentry->d_name.len,
Expand Down Expand Up @@ -350,6 +352,10 @@ static int ocfs2_mknod(struct inode *dir,
goto leave;
}

/* Starting to change things, restart is no longer possible. */
ocfs2_block_signals(&oldset);
did_block_signals = 1;

status = dquot_alloc_inode(inode);
if (status)
goto leave;
Expand Down Expand Up @@ -430,6 +436,8 @@ static int ocfs2_mknod(struct inode *dir,
ocfs2_commit_trans(osb, handle);

ocfs2_inode_unlock(dir, 1);
if (did_block_signals)
ocfs2_unblock_signals(&oldset);

if (status == -ENOSPC)
mlog(0, "Disk is full\n");
Expand Down Expand Up @@ -618,6 +626,7 @@ static int ocfs2_link(struct dentry *old_dentry,
struct ocfs2_dinode *fe = NULL;
struct ocfs2_super *osb = OCFS2_SB(dir->i_sb);
struct ocfs2_dir_lookup_result lookup = { NULL, };
sigset_t oldset;

mlog_entry("(inode=%lu, old='%.*s' new='%.*s')\n", inode->i_ino,
old_dentry->d_name.len, old_dentry->d_name.name,
Expand Down Expand Up @@ -674,6 +683,9 @@ static int ocfs2_link(struct dentry *old_dentry,
goto out_unlock_inode;
}

/* Starting to change things, restart is no longer possible. */
ocfs2_block_signals(&oldset);

err = ocfs2_journal_access_di(handle, INODE_CACHE(inode), fe_bh,
OCFS2_JOURNAL_ACCESS_WRITE);
if (err < 0) {
Expand Down Expand Up @@ -710,6 +722,7 @@ static int ocfs2_link(struct dentry *old_dentry,

out_commit:
ocfs2_commit_trans(osb, handle);
ocfs2_unblock_signals(&oldset);
out_unlock_inode:
ocfs2_inode_unlock(inode, 1);

Expand Down Expand Up @@ -1568,6 +1581,8 @@ static int ocfs2_symlink(struct inode *dir,
};
int did_quota = 0, did_quota_inode = 0;
struct ocfs2_dir_lookup_result lookup = { NULL, };
sigset_t oldset;
int did_block_signals = 0;

mlog_entry("(0x%p, 0x%p, symname='%s' actual='%.*s')\n", dir,
dentry, symname, dentry->d_name.len, dentry->d_name.name);
Expand Down Expand Up @@ -1663,6 +1678,10 @@ static int ocfs2_symlink(struct inode *dir,
goto bail;
}

/* Starting to change things, restart is no longer possible. */
ocfs2_block_signals(&oldset);
did_block_signals = 1;

status = dquot_alloc_inode(inode);
if (status)
goto bail;
Expand Down Expand Up @@ -1766,6 +1785,8 @@ static int ocfs2_symlink(struct inode *dir,
ocfs2_commit_trans(osb, handle);

ocfs2_inode_unlock(dir, 1);
if (did_block_signals)
ocfs2_unblock_signals(&oldset);

brelse(new_fe_bh);
brelse(parent_fe_bh);
Expand Down

0 comments on commit a4c85d2

Please sign in to comment.