diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-02-09 12:00:15 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-02-10 10:42:45 +0100 |
commit | 6491f67d3ea09140c9b3c3517defa333015e0690 (patch) | |
tree | daf67528750ee91ed69cfe112a1a09130a50630e | |
parent | Increase stack size for symbolic link loop test (diff) | |
download | rtems-6491f67d3ea09140c9b3c3517defa333015e0690.tar.bz2 |
Moved empty test in front of busy tests
-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)) |