Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190558
b: refs/heads/master
c: f9221fd
h: refs/heads/master
v: v3
  • Loading branch information
Joel Becker committed Apr 30, 2010
1 parent d2b553f commit 9013423
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a9743fcdc0eb43d028b71267438076e1b0112ba0
refs/heads/master: f9221fd80343285514568da6c5dbda0f87109de8
2 changes: 2 additions & 0 deletions trunk/fs/ocfs2/buffer_head_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ int ocfs2_write_super_or_backup(struct ocfs2_super *osb,
struct buffer_head *bh)
{
int ret = 0;
struct ocfs2_dinode *di = (struct ocfs2_dinode *)bh->b_data;

mlog_entry_void();

Expand All @@ -425,6 +426,7 @@ int ocfs2_write_super_or_backup(struct ocfs2_super *osb,

get_bh(bh); /* for end_buffer_write_sync() */
bh->b_end_io = end_buffer_write_sync;
ocfs2_compute_meta_ecc(osb->sb, bh->b_data, &di->i_check);
submit_bh(WRITE, bh);

wait_on_buffer(bh);
Expand Down
5 changes: 2 additions & 3 deletions trunk/fs/ocfs2/dlm/dlmast.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,8 @@ static void dlm_update_lvb(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
BUG_ON(!lksb);

/* only updates if this node masters the lockres */
spin_lock(&res->spinlock);
if (res->owner == dlm->node_num) {

spin_lock(&res->spinlock);
/* check the lksb flags for the direction */
if (lksb->flags & DLM_LKSB_GET_LVB) {
mlog(0, "getting lvb from lockres for %s node\n",
Expand All @@ -201,8 +200,8 @@ static void dlm_update_lvb(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
* here. In the future we might want to clear it at the time
* the put is actually done.
*/
spin_unlock(&res->spinlock);
}
spin_unlock(&res->spinlock);

/* reset any lvb flags on the lksb */
lksb->flags &= ~(DLM_LKSB_PUT_LVB|DLM_LKSB_GET_LVB);
Expand Down
14 changes: 7 additions & 7 deletions trunk/fs/ocfs2/dlmfs/dlmfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,20 +112,20 @@ MODULE_PARM_DESC(capabilities, DLMFS_CAPABILITIES);
* O_RDONLY -> PRMODE level
* O_WRONLY -> EXMODE level
*
* O_NONBLOCK -> LKM_NOQUEUE
* O_NONBLOCK -> NOQUEUE
*/
static int dlmfs_decode_open_flags(int open_flags,
int *level,
int *flags)
{
if (open_flags & (O_WRONLY|O_RDWR))
*level = LKM_EXMODE;
*level = DLM_LOCK_EX;
else
*level = LKM_PRMODE;
*level = DLM_LOCK_PR;

*flags = 0;
if (open_flags & O_NONBLOCK)
*flags |= LKM_NOQUEUE;
*flags |= DLM_LKF_NOQUEUE;

return 0;
}
Expand Down Expand Up @@ -166,7 +166,7 @@ static int dlmfs_file_open(struct inode *inode,
* to be able userspace to be able to distinguish a
* valid lock request from one that simply couldn't be
* granted. */
if (flags & LKM_NOQUEUE && status == -EAGAIN)
if (flags & DLM_LKF_NOQUEUE && status == -EAGAIN)
status = -ETXTBSY;
kfree(fp);
goto bail;
Expand All @@ -193,7 +193,7 @@ static int dlmfs_file_release(struct inode *inode,
status = 0;
if (fp) {
level = fp->fp_lock_level;
if (level != LKM_IVMODE)
if (level != DLM_LOCK_IV)
user_dlm_cluster_unlock(&ip->ip_lockres, level);

kfree(fp);
Expand Down Expand Up @@ -262,7 +262,7 @@ static ssize_t dlmfs_file_read(struct file *filp,
if ((count + *ppos) > i_size_read(inode))
readlen = i_size_read(inode) - *ppos;
else
readlen = count - *ppos;
readlen = count;

lvb_buf = kmalloc(readlen, GFP_NOFS);
if (!lvb_buf)
Expand Down
7 changes: 4 additions & 3 deletions trunk/fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ static int __ocfs2_extend_allocation(struct inode *inode, u32 logical_start,
if (why == RESTART_META) {
mlog(0, "restarting function.\n");
restart_func = 1;
status = 0;
} else {
BUG_ON(why != RESTART_TRANS);

Expand Down Expand Up @@ -2021,9 +2022,9 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
if (ret < 0)
written = ret;

if (!ret && (old_size != i_size_read(inode) ||
old_clusters != OCFS2_I(inode)->ip_clusters ||
has_refcount)) {
if (!ret && ((old_size != i_size_read(inode)) ||
(old_clusters != OCFS2_I(inode)->ip_clusters) ||
has_refcount)) {
ret = jbd2_journal_force_commit(osb->journal->j_journal);
if (ret < 0)
written = ret;
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/ocfs2/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb,
handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS);
if (IS_ERR(handle)) {
status = PTR_ERR(handle);
handle = NULL;
mlog_errno(status);
goto out;
}
Expand Down
3 changes: 3 additions & 0 deletions trunk/fs/ocfs2/refcounttree.c
Original file line number Diff line number Diff line change
Expand Up @@ -4083,6 +4083,9 @@ static int ocfs2_complete_reflink(struct inode *s_inode,
di->i_attr = s_di->i_attr;

if (preserve) {
t_inode->i_uid = s_inode->i_uid;
t_inode->i_gid = s_inode->i_gid;
t_inode->i_mode = s_inode->i_mode;
di->i_uid = s_di->i_uid;
di->i_gid = s_di->i_gid;
di->i_mode = s_di->i_mode;
Expand Down

0 comments on commit 9013423

Please sign in to comment.