summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-06-24 19:19:56 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-06-24 19:19:56 +0000
commitbb9d505f80cff9165989824780cd9e15944b079d (patch)
treecc157182e0210c1a24b57aa5ce887bdd6b88bb36 /libdiskfs
parent5d7ee86cd8a8b409fece1c36c2038f5e30e8df24 (diff)
(diskfs_S_file_set_translator): Validate rdev change before making it.
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/file-set-trans.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libdiskfs/file-set-trans.c b/libdiskfs/file-set-trans.c
index c2edec87..4042cbce 100644
--- a/libdiskfs/file-set-trans.c
+++ b/libdiskfs/file-set-trans.c
@@ -159,6 +159,13 @@ diskfs_S_file_set_translator (struct protid *cred,
}
minor = strtol (arg, 0, 0);
+ error = diskfs_validate_rdev_change (np,
+ makedev (major, minor));
+ if (error)
+ {
+ mutex_unlock (&np->lock);
+ return error;
+ }
np->dn_stat.st_rdev = makedev (major, minor);
}