From 6491f67d3ea09140c9b3c3517defa333015e0690 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 9 Feb 2012 12:00:15 +0100 Subject: Moved empty test in front of busy tests --- cpukit/libfs/src/dosfs/msdos_dir.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cpukit/libfs/src/dosfs/msdos_dir.c b/cpukit/libfs/src/dosfs/msdos_dir.c index a0ef507392..494b9fbae6 100644 --- a/cpukit/libfs/src/dosfs/msdos_dir.c +++ b/cpukit/libfs/src/dosfs/msdos_dir.c @@ -640,16 +640,6 @@ msdos_dir_rmnod(rtems_filesystem_location_info_t *parent_pathloc, if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); - /* - * We deny attempts to delete open directory (if directory is current - * directory we assume it is open one) - */ - if (fat_fd->links_num > 1) - { - rtems_semaphore_release(fs_info->vol_sema); - rtems_set_errno_and_return_minus_one(EBUSY); - } - /* * You cannot remove a node that still has children */ @@ -666,6 +656,16 @@ msdos_dir_rmnod(rtems_filesystem_location_info_t *parent_pathloc, rtems_set_errno_and_return_minus_one(ENOTEMPTY); } + /* + * We deny attempts to delete open directory (if directory is current + * directory we assume it is open one) + */ + if (fat_fd->links_num > 1) + { + rtems_semaphore_release(fs_info->vol_sema); + rtems_set_errno_and_return_minus_one(EBUSY); + } + /* * You cannot remove the file system root node. */ -- cgit v1.2.3