Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27742
b: refs/heads/master
c: 422138d
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Bazhenov authored and David Woodhouse committed May 5, 2006
1 parent 81bc2a8 commit 6a1b853
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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: edc4ff7c08e9885c40e60c4fb39fa42cc91a0602
refs/heads/master: 422138dd68202fbd8ca9fb0df65e92d733249374
7 changes: 6 additions & 1 deletion trunk/fs/jffs2/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,20 @@ static int jffs2_do_setattr (struct inode *inode, struct iattr *iattr)
mdatalen = sizeof(dev);
D1(printk(KERN_DEBUG "jffs2_setattr(): Writing %d bytes of kdev_t\n", mdatalen));
} else if (S_ISLNK(inode->i_mode)) {
down(&f->sem);
mdatalen = f->metadata->size;
mdata = kmalloc(f->metadata->size, GFP_USER);
if (!mdata)
if (!mdata) {
up(&f->sem);
return -ENOMEM;
}
ret = jffs2_read_dnode(c, f, f->metadata, mdata, 0, mdatalen);
if (ret) {
up(&f->sem);
kfree(mdata);
return ret;
}
up(&f->sem);
D1(printk(KERN_DEBUG "jffs2_setattr(): Writing %d bytes of symlink target\n", mdatalen));
}

Expand Down

0 comments on commit 6a1b853

Please sign in to comment.