Permalink
Browse files

Added call to unlock_new_inode in lzfs_xattr_set

  • Loading branch information...
1 parent 3138008 commit 3bf02a674ad2f06f3962a4d2aa5b159445ffebad Prasad Joshi committed Feb 25, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 module/lzfs_xattr.c
View
@@ -41,6 +41,7 @@ lzfs_xattr_set(struct inode *inode, const char *name,
.uio_limit = MAXOFFSET_T,
.uio_segflg = UIO_SYSSPACE,
};
+ struct inode *xinode;
dvp = LZFS_ITOV(inode);
@@ -66,11 +67,16 @@ lzfs_xattr_set(struct inode *inode, const char *name,
err = zfs_create(vp, (char *) xattr_name, vap, 0, 0644,
&xvp, (cred_t *)cred, 0, NULL, NULL);
kfree(vap);
- if(err)
+ xinode = LZFS_VTOI(xvp);
+ if(err) {
+ unlock_new_inode(xinode);
+ iput(xinode);
return -err;
+ }
err = zfs_write(xvp, &uio, 0, (cred_t *)cred, NULL);
(void)put_cred(cred);
+ unlock_new_inode(xinode);
return (err ? -err : 0);
}

0 comments on commit 3bf02a6

Please sign in to comment.