summaryrefslogtreecommitdiff
path: root/libdiskfs/dir-init.c
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-11-23 20:13:30 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-11-23 23:06:19 +0100
commit9cd99ff80c3c129ed137e0d22b7e438f292e5e8f (patch)
treee4c4603282b425e22754d8cbfa8d25e7d210fc93 /libdiskfs/dir-init.c
parentb3fcdc50024b3837a76cd854d02a940dac2e5dc3 (diff)
libdiskfs: fix fabrication of protid
* libdiskfs/dir-init.c (diskfs_init_dir): Fix fabrication of protid.
Diffstat (limited to 'libdiskfs/dir-init.c')
-rw-r--r--libdiskfs/dir-init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libdiskfs/dir-init.c b/libdiskfs/dir-init.c
index 4efded07..8301ca1b 100644
--- a/libdiskfs/dir-init.c
+++ b/libdiskfs/dir-init.c
@@ -33,7 +33,8 @@ diskfs_init_dir (struct node *dp, struct node *pdp, struct protid *cred)
static uid_t zero = 0;
static struct idvec vec = {&zero, 1, 1};
static struct iouser user = {&vec, &vec, 0};
- struct protid lookupcred = {{0, 0, 0, 0}, &user, cred->po, 0, 0};
+ struct protid lookupcred = {{ .refcounts = { .references = {1, 0}}},
+ &user, cred->po, 0, 0};
/* New links */
if (pdp->dn_stat.st_nlink == diskfs_link_max - 1)