Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211577
b: refs/heads/master
c: f17c89b
h: refs/heads/master
i:
  211575: 41706bd
v: v3
  • Loading branch information
Christoph Hellwig authored and Christoph Hellwig committed Oct 1, 2010
1 parent 47597d4 commit 1088a57
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 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: 30d3abbec730a5a9c954a6342271f7a7db155b08
refs/heads/master: f17c89bfcc9cccd405098eac3ec1ebfddf03279e
26 changes: 12 additions & 14 deletions trunk/fs/hfsplus/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,31 +364,29 @@ static int hfsplus_rmdir(struct inode *dir, struct dentry *dentry)
static int hfsplus_symlink(struct inode *dir, struct dentry *dentry,
const char *symname)
{
struct super_block *sb;
struct inode *inode;
int res;

sb = dir->i_sb;
inode = hfsplus_new_inode(sb, S_IFLNK | S_IRWXUGO);
inode = hfsplus_new_inode(dir->i_sb, S_IFLNK | S_IRWXUGO);
if (!inode)
return -ENOSPC;

res = page_symlink(inode, symname, strlen(symname) + 1);
if (res) {
inode->i_nlink = 0;
hfsplus_delete_inode(inode);
iput(inode);
return res;
}
if (res)
goto out_err;

mark_inode_dirty(inode);
res = hfsplus_create_cat(inode->i_ino, dir, &dentry->d_name, inode);
if (res)
goto out_err;

if (!res) {
hfsplus_instantiate(dentry, inode, inode->i_ino);
mark_inode_dirty(inode);
}
hfsplus_instantiate(dentry, inode, inode->i_ino);
mark_inode_dirty(inode);
return 0;

out_err:
inode->i_nlink = 0;
hfsplus_delete_inode(inode);
iput(inode);
return res;
}

Expand Down

0 comments on commit 1088a57

Please sign in to comment.