Changes by: yura
Update of /cvs/linux-ntfs/ntfsprogs/ntfsprogs
In directory delta357:/tmp/cvs-serv30764/ntfsprogs
Modified Files:
ntfsmount.c
Log Message:
make ntfs_attr_rm to always close attribute (both on success and failure)
Index: ntfsmount.c
===================================================================
RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/ntfsmount.c,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -p -r1.99 -r1.100
--- ntfsmount.c 21 Nov 2006 16:24:37 -0000 1.99
+++ ntfsmount.c 22 Nov 2006 18:28:13 -0000 1.100
@@ -981,10 +981,8 @@ static int ntfs_fuse_rm_stream(const cha
res = -errno;
goto exit;
}
- if (ntfs_attr_rm(na)) {
+ if (ntfs_attr_rm(na))
res = -errno;
- ntfs_attr_close(na);
- }
exit:
if (ntfs_inode_close(ni))
ntfs_log_perror("Failed to close inode");
@@ -1322,7 +1320,6 @@ static int ntfs_fuse_removexattr(const c
ntfschar *lename = NULL;
int res = 0, lename_len;
-
if (ctx->streams != NF_STREAMS_INTERFACE_XATTR)
return -EOPNOTSUPP;
if (strncmp(name, nf_ns_xattr_preffix, nf_ns_xattr_preffix_len) ||
@@ -1347,8 +1344,7 @@ static int ntfs_fuse_removexattr(const c
ntfs_fuse_mark_free_space_outdated();
if (ntfs_attr_rm(na))
res = -errno;
- else
- na = NULL;
+ na = NULL;
exit:
if (na)
ntfs_attr_close(na);
|