# error "FUSE mount not supported on Windows! Please configure --without-fuse"
#endif
-#include "wimlib/dentry.h"
-#include "wimlib/encoding.h"
-#include "wimlib/lookup_table.h"
-#include "wimlib/metadata.h"
-#include "wimlib/paths.h"
-#include "wimlib/progress.h"
-#include "wimlib/reparse.h"
-#include "wimlib/timestamp.h"
-#include "wimlib/unix_data.h"
-#include "wimlib/write.h"
-#include "wimlib/xml.h"
+#define FUSE_USE_VERSION 26
+#include <attr/xattr.h>
#include <dirent.h>
#include <errno.h>
+#include <fuse.h>
#include <limits.h>
#include <mqueue.h>
#include <pthread.h>
#include <unistd.h>
#include <utime.h>
-#define FUSE_USE_VERSION 26
-#include <fuse.h>
-#include <attr/xattr.h>
+#include "wimlib/dentry.h"
+#include "wimlib/encoding.h"
+#include "wimlib/lookup_table.h"
+#include "wimlib/metadata.h"
+#include "wimlib/paths.h"
+#include "wimlib/progress.h"
+#include "wimlib/reparse.h"
+#include "wimlib/timestamp.h"
+#include "wimlib/unix_data.h"
+#include "wimlib/write.h"
+#include "wimlib/xml.h"
#ifndef O_NOFOLLOW
# define O_NOFOLLOW 0 /* Security only... */
if (fd->f_idx < inode->i_next_fd)
inode->i_next_fd = fd->f_idx;
FREE(fd);
- if (--inode->i_num_opened_fds == 0) {
- /* The last file descriptor to this inode was closed. */
- FREE(inode->i_fds);
- inode->i_fds = NULL;
- inode->i_num_allocated_fds = 0;
- if (inode->i_nlink == 0)
- /* No links to this inode remain. Get rid of it. */
- free_inode(inode);
- }
+ inode_dec_num_opened_fds(inode);
return ret;
}
if (new_dentry(new_name, &new_alias))
return -ENOMEM;
- new_alias->d_inode = inode;
- inode_add_dentry(new_alias, inode);
+ inode_ref_streams(inode);
+ d_associate(new_alias, inode);
dentry_add_child(dir, new_alias);
touch_inode(dir->d_inode);
- inode->i_nlink++;
- inode_ref_streams(inode);
return 0;
}