diff options
-rw-r--r-- | libdiskfs/file-set-trans.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libdiskfs/file-set-trans.c b/libdiskfs/file-set-trans.c index 6e1a61d2..3238037a 100644 --- a/libdiskfs/file-set-trans.c +++ b/libdiskfs/file-set-trans.c @@ -168,7 +168,20 @@ diskfs_S_file_set_translator (struct protid *cred, np->dn_stat.st_rdev = makedev (major, minor); } - diskfs_truncate (np, 0); + err = diskfs_truncate (np, 0); + if (err) + { + pthread_mutex_unlock (&np->lock); + return err; + } + + err = diskfs_set_translator (np, NULL, 0, cred); + if (err) + { + pthread_mutex_unlock (&np->lock); + return err; + } + if (newmode == S_IFLNK) { char *arg = passive + strlen (passive) + 1; |