Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76058
b: refs/heads/master
c: 9656b2c
h: refs/heads/master
v: v3
  • Loading branch information
Steven Whitehouse committed Jan 25, 2008
1 parent ffc0b62 commit 55e4c24
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 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: 0811a127cb83ad2e0355e5e3e30164d7ef0f2d65
refs/heads/master: 9656b2c14c6ee0806c90a6be41dec71117fc8f50
13 changes: 5 additions & 8 deletions trunk/fs/gfs2/ops_address.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,14 +848,11 @@ static int gfs2_write_end(struct file *file, struct address_space *mapping,

ret = generic_write_end(file, mapping, pos, len, copied, page, fsdata);

if (likely(ret >= 0)) {
copied = ret;
if ((pos + copied) > inode->i_size) {
di = (struct gfs2_dinode *)dibh->b_data;
ip->i_di.di_size = inode->i_size;
di->di_size = cpu_to_be64(inode->i_size);
mark_inode_dirty(inode);
}
if (likely(ret >= 0) && (inode->i_size > ip->i_di.di_size)) {
di = (struct gfs2_dinode *)dibh->b_data;
ip->i_di.di_size = inode->i_size;
di->di_size = cpu_to_be64(inode->i_size);
mark_inode_dirty(inode);
}

if (inode == sdp->sd_rindex)
Expand Down
12 changes: 11 additions & 1 deletion trunk/fs/gfs2/ops_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,18 @@ static struct dentry *gfs2_lookup(struct inode *dir, struct dentry *dentry,
if (inode && IS_ERR(inode))
return ERR_PTR(PTR_ERR(inode));

if (inode)
if (inode) {
struct gfs2_glock *gl = GFS2_I(inode)->i_gl;
struct gfs2_holder gh;
int error;
error = gfs2_glock_nq_init(gl, LM_ST_SHARED, LM_FLAG_ANY, &gh);
if (error) {
iput(inode);
return ERR_PTR(error);
}
gfs2_glock_dq_uninit(&gh);
return d_splice_alias(inode, dentry);
}
d_add(dentry, inode);

return NULL;
Expand Down

0 comments on commit 55e4c24

Please sign in to comment.