diff options
-rw-r--r-- | cpukit/libfs/src/dosfs/msdos_dir.c | 20 |
1 files 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 @@ -641,16 +641,6 @@ msdos_dir_rmnod(rtems_filesystem_location_info_t *parent_pathloc, 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 */ rc = msdos_dir_is_empty(pathloc->mt_entry, fat_fd, &is_empty); @@ -667,6 +657,16 @@ msdos_dir_rmnod(rtems_filesystem_location_info_t *parent_pathloc, } /* + * 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. */ if (rtems_filesystem_is_root_location(pathloc)) |