Changeset 24809

Show
Ignore:
Timestamp:
04/05/08 08:24:11 (8 months ago)
Author:
axeld
Message:

* Added checks to (hopefully) all write/create functions to bail out early

if the volume is read-only. This should help with #2028.

* Removed unused bfs_[de]select() functions.
* Removed most paranoia checks - now that we control both sides of code,

this would just hide eventual problems in the VFS code.

* Cleanup.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • haiku/trunk/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp

    r24580 r24809  
    131131 
    132132static status_t 
    133 bfs_unmount(void *ns) 
    134 { 
    135         FUNCTION(); 
    136         Volume* volume = (Volume *)ns; 
     133bfs_unmount(void *_fs) 
     134{ 
     135        FUNCTION(); 
     136        Volume* volume = (Volume *)_fs; 
    137137 
    138138        status_t status = volume->Unmount(); 
     
    143143 
    144144 
    145 /**     Fill in bfs_info struct for device. 
    146  */ 
    147  
    148 static status_t 
    149 bfs_read_fs_stat(void *_ns, struct fs_info *info) 
    150 { 
    151         FUNCTION(); 
    152         if (_ns == NULL || info == NULL) 
    153                 return B_BAD_VALUE; 
    154  
    155         Volume *volume = (Volume *)_ns; 
    156  
     145static status_t 
     146bfs_read_fs_stat(void *_fs, struct fs_info *info) 
     147{ 
     148        FUNCTION(); 
     149 
     150        Volume *volume = (Volume *)_fs; 
    157151        RecursiveLocker locker(volume->Lock()); 
    158152 
    159153        // File system flags. 
    160         info->flags = B_FS_IS_PERSISTENT | B_FS_HAS_ATTR | B_FS_HAS_MIME | B_FS_HAS_QUERY | 
    161                         (volume->IsReadOnly() ? B_FS_IS_READONLY : 0); 
     154        info->flags = B_FS_IS_PERSISTENT | B_FS_HAS_ATTR | B_FS_HAS_MIME 
     155                | B_FS_HAS_QUERY | (volume->IsReadOnly() ? B_FS_IS_READONLY : 0); 
    162156 
    163157        info->io_size = BFS_IO_SIZE; 
    164                 // whatever is appropriate here? Just use the same value as BFS (and iso9660) for now 
     158                // whatever is appropriate here? 
    165159 
    166160        info->block_size = volume->BlockSize(); 
     
    179173 
    180174static status_t 
    181 bfs_write_fs_stat(void *_ns, const struct fs_info *info, uint32 mask) 
     175bfs_write_fs_stat(void *_fs, const struct fs_info *info, uint32 mask) 
    182176{ 
    183177        FUNCTION_START(("mask = %ld\n", mask)); 
    184178 
    185         Volume *volume = (Volume *)_ns; 
    186         disk_super_block &superBlock = volume->SuperBlock(); 
     179        Volume *volume = (Volume *)_fs; 
     180        if (volume->IsReadOnly()) 
     181                return B_READ_ONLY_DEVICE; 
    187182 
    188183        RecursiveLocker locker(volume->Lock()); 
     
    191186 
    192187        if (mask & FS_WRITE_FSINFO_NAME) { 
    193                 strncpy(superBlock.name, info->volume_name, sizeof(superBlock.name) - 1); 
     188                disk_super_block &superBlock = volume->SuperBlock(); 
     189 
     190                strncpy(superBlock.name, info->volume_name, 
     191                        sizeof(superBlock.name) - 1); 
    194192                superBlock.name[sizeof(superBlock.name) - 1] = '\0'; 
    195193 
     
    201199 
    202200static status_t 
    203 bfs_sync(void *_ns) 
    204 { 
    205         FUNCTION(); 
    206         if (_ns == NULL) 
    207                 return B_BAD_VALUE; 
    208  
    209         Volume *volume = (Volume *)_ns; 
    210  
     201bfs_sync(void *_fs) 
     202{ 
     203        FUNCTION(); 
     204 
     205        Volume *volume = (Volume *)_fs; 
    211206        return volume->Sync(); 
    212207} 
     
    219214*/ 
    220215static status_t 
    221 bfs_get_vnode(void *_ns, ino_t id, void **_node, bool reenter) 
     216bfs_get_vnode(void *_fs, ino_t id, void **_node, bool reenter) 
    222217{ 
    223218        //FUNCTION_START(("ino_t = %Ld\n", id)); 
    224         Volume *volume = (Volume *)_ns; 
     219        Volume *volume = (Volume *)_fs; 
    225220 
    226221        // first inode may be after the log area, we don't go through 
     
    285280 
    286281static status_t 
    287 bfs_remove_vnode(void *_ns, void *_node, bool reenter) 
    288 { 
    289         FUNCTION(); 
    290  
    291         if (_ns == NULL || _node == NULL) 
    292                 return B_BAD_VALUE; 
    293  
    294         Volume *volume = (Volume *)_ns; 
     282bfs_remove_vnode(void *_fs, void *_node, bool reenter) 
     283{ 
     284        FUNCTION(); 
     285 
     286        Volume *volume = (Volume *)_fs; 
    295287        Inode *inode = (Inode *)_node; 
    296288 
     
    326318bfs_can_page(fs_volume _fs, fs_vnode _v, fs_cookie _cookie) 
    327319{ 
    328         // ToDo: we're obviously not even asked... 
     320        // TODO: we're obviously not even asked... 
    329321        return false; 
    330322} 
     
    383375        Volume *volume = (Volume *)_fs; 
    384376        Inode *inode = (Inode *)_node; 
     377 
     378        if (volume->IsReadOnly()) 
     379                return B_READ_ONLY_DEVICE; 
    385380 
    386381        if (inode->FileCache() == NULL) 
     
    453448                                // make sure the extent ends with the last official file 
    454449                                // block (without taking any preallocations into account) 
    455                                 vecs[index].length = (inode->Size() - fileOffset + volume->BlockSize() - 1) 
    456                                         & ~(volume->BlockSize() - 1); 
     450                                vecs[index].length = (inode->Size() - fileOffset 
     451                                        + volume->BlockSize() - 1) & ~(volume->BlockSize() - 1); 
    457452                        } 
    458453                        *_count = index + 1; 
     
    479474 
    480475static status_t 
    481 bfs_lookup(void *_ns, void *_directory, const char *file, ino_t *_vnodeID, int *_type) 
     476bfs_lookup(void *_fs, void *_directory, const char *file, ino_t *_vnodeID, 
     477        int *_type) 
    482478{ 
    483479        //FUNCTION_START(("file = %s\n", file)); 
    484         if (_ns == NULL || _directory == NULL || file == NULL || _vnodeID == NULL) 
    485                 return B_BAD_VALUE; 
    486  
    487         Volume *volume = (Volume *)_ns; 
     480 
     481        Volume *volume = (Volume *)_fs; 
    488482        Inode *directory = (Inode *)_directory; 
    489483 
     
    497491                RETURN_ERROR(B_BAD_VALUE); 
    498492 
    499         if ((status = tree->Find((uint8 *)file, (uint16)strlen(file), _vnodeID)) < B_OK) { 
     493        status = tree->Find((uint8 *)file, (uint16)strlen(file), _vnodeID); 
     494        if (status < B_OK) { 
    500495                //PRINT(("bfs_walk() could not find %Ld:\"%s\": %s\n", directory->BlockNumber(), file, strerror(status))); 
    501496                return status; 
     
    507502 
    508503        Inode *inode; 
    509         if ((status = get_vnode(volume->ID(), *_vnodeID, (void **)&inode)) != B_OK) { 
     504        status = get_vnode(volume->ID(), *_vnodeID, (void **)&inode); 
     505        if (status != B_OK) { 
    510506                REPORT_ERROR(status); 
    511507                return B_ENTRY_NOT_FOUND; 
     
    592588                case 56742: 
    593589                { 
    594                         // allocate all free blocks and zero them out (a test for the BlockAllocator)! 
     590                        // allocate all free blocks and zero them out 
     591                        // (a test for the BlockAllocator)! 
    595592                        BlockAllocator &allocator = volume->Allocator(); 
    596593                        Transaction transaction(volume, 0); 
    597594                        CachedBlock cached(volume); 
    598595                        block_run run; 
    599                         while (allocator.AllocateBlocks(transaction, 8, 0, 64, 1, run) == B_OK) { 
     596                        while (allocator.AllocateBlocks(transaction, 8, 0, 64, 1, run) 
     597                                        == B_OK) { 
    600598                                PRINT(("write block_run(%ld, %d, %d)\n", run.allocation_group, 
    601599                                        run.start, run.length)); 
     
    627625 
    628626 
    629 /** Sets the open-mode flags for the open file cookie - only 
    630  *      supports O_APPEND currently, but that should be sufficient 
    631  *      for a file system. 
    632  */ 
    633  
    634 static status_t 
    635 bfs_set_flags(void *_ns, void *_node, void *_cookie, int flags) 
     627/*!     Sets the open-mode flags for the open file cookie - only 
     628        supports O_APPEND currently, but that should be sufficient 
     629        for a file system. 
     630*/ 
     631static status_t 
     632bfs_set_flags(void *_fs, void *_node, void *_cookie, int flags) 
    636633{ 
    637634        FUNCTION_START(("node = %p, flags = %d", _node, flags)); 
     
    644641 
    645642 
    646 #if 0 
    647 static status_t 
    648 bfs_select(void *ns, void *node, void *cookie, uint8 event, uint32 ref, selectsync *sync) 
    649 { 
    650         FUNCTION_START(("event = %d, ref = %lu, sync = %p\n", event, ref, sync)); 
    651         notify_select_event(sync, ref); 
    652  
    653         return B_OK; 
    654 } 
    655  
    656  
    657 static status_t 
    658 bfs_deselect(void *ns, void *node, void *cookie, uint8 event, selectsync *sync) 
    659 { 
    660         FUNCTION(); 
    661         return B_OK; 
    662 } 
    663 #endif 
    664  
    665 static status_t 
    666 bfs_fsync(void *_ns, void *_node) 
    667 { 
    668         FUNCTION(); 
    669         if (_node == NULL) 
    670                 return B_BAD_VALUE; 
     643static status_t 
     644bfs_fsync(void *_fs, void *_node) 
     645{ 
     646        FUNCTION(); 
    671647 
    672648        Inode *inode = (Inode *)_node; 
     
    681657 
    682658 
    683 /**     Fills in the stat struct for a node 
    684  */ 
    685  
    686 static status_t 
    687 bfs_read_stat(void *_ns, void *_node, struct stat *stat) 
     659static status_t 
     660bfs_read_stat(void *_fs, void *_node, struct stat *stat) 
    688661{ 
    689662        FUNCTION(); 
     
    697670 
    698671static status_t 
    699 bfs_write_stat(void *_ns, void *_node, const struct stat *stat, uint32 mask) 
    700 { 
    701         FUNCTION(); 
    702  
    703         if (_ns == NULL || _node == NULL || stat == NULL) 
    704                 RETURN_ERROR(B_BAD_VALUE); 
    705  
    706         Volume *volume = (Volume *)_ns; 
     672bfs_write_stat(void *_fs, void *_node, const struct stat *stat, uint32 mask) 
     673{ 
     674        FUNCTION(); 
     675 
     676        Volume *volume = (Volume *)_fs; 
    707677        Inode *inode = (Inode *)_node; 
     678 
     679        if (volume->IsReadOnly()) 
     680                return B_READ_ONLY_DEVICE; 
    708681 
    709682        // TODO: we should definitely check a bit more if the new stats are 
     
    789762 
    790763status_t 
    791 bfs_create(void *_ns, void *_directory, const char *name, int openMode, 
     764bfs_create(void *_fs, void *_directory, const char *name, int openMode, 
    792765        int mode, void **_cookie, ino_t *_vnodeID) 
    793766{ 
    794767        FUNCTION_START(("name = \"%s\", perms = %d, openMode = %d\n", name, mode, openMode)); 
    795768 
    796         if (_ns == NULL || _directory == NULL || _cookie == NULL 
    797                 || name == NULL || *name == '\0') 
    798                 RETURN_ERROR(B_BAD_VALUE); 
    799  
    800         Volume *volume = (Volume *)_ns; 
     769        Volume *volume = (Volume *)_fs; 
    801770        Inode *directory = (Inode *)_directory; 
     771 
     772        if (volume->IsReadOnly()) 
     773                return B_READ_ONLY_DEVICE; 
    802774 
    803775        if (!directory->IsDirectory()) 
     
    827799                *_cookie = cookie; 
    828800 
    829                 if (created) 
    830                         notify_entry_created(volume->ID(), directory->ID(), name, *_vnodeID); 
     801                if (created) { 
     802                        notify_entry_created(volume->ID(), directory->ID(), name, 
     803                                *_vnodeID); 
     804                } 
    831805        } else 
    832806                free(cookie); 
     
    837811 
    838812static status_t 
    839 bfs_create_symlink(void *_ns, void *_directory, const char *name, 
     813bfs_create_symlink(void *_fs, void *_directory, const char *name, 
    840814        const char *path, int mode) 
    841815{ 
    842816        FUNCTION_START(("name = \"%s\", path = \"%s\"\n", name, path)); 
    843817 
    844         if (_ns == NULL || _directory == NULL || path == NULL 
    845                 || name == NULL || *name == '\0') 
    846                 RETURN_ERROR(B_BAD_VALUE); 
    847  
    848         Volume *volume = (Volume *)_ns; 
     818        Volume *volume = (Volume *)_fs; 
    849819        Inode *directory = (Inode *)_directory; 
     820 
     821        if (volume->IsReadOnly()) 
     822                return B_READ_ONLY_DEVICE; 
    850823 
    851824        if (!directory->IsDirectory()) 
     
    900873 
    901874status_t 
    902 bfs_link(void *ns, void *dir, const char *name, void *node) 
     875bfs_link(void *_fs, void *dir, const char *name, void *node) 
    903876{ 
    904877        FUNCTION_START(("name = \"%s\"\n", name)); 
     
    911884 
    912885status_t 
    913 bfs_unlink(void *_ns, void *_directory, const char *name) 
     886bfs_unlink(void *_fs, void *_directory, const char *name) 
    914887{ 
    915888        FUNCTION_START(("name = \"%s\"\n", name)); 
    916889 
    917         if (_ns == NULL || _directory == NULL || name == NULL || *name == '\0') 
    918                 return B_BAD_VALUE; 
    919890        if (!strcmp(name, "..") || !strcmp(name, ".")) 
    920891                return B_NOT_ALLOWED; 
    921892 
    922         Volume *volume = (Volume *)_ns; 
     893        Volume *volume = (Volume *)_fs; 
    923894        Inode *directory = (Inode *)_directory; 
    924895 
     
    940911 
    941912status_t 
    942 bfs_rename(void *_ns, void *_oldDir, const char *oldName, void *_newDir, const char *newName) 
     913bfs_rename(void *_fs, void *_oldDir, const char *oldName, void *_newDir, 
     914        const char *newName) 
    943915{ 
    944916        FUNCTION_START(("oldDir = %p, oldName = \"%s\", newDir = %p, newName = \"%s\"\n", _oldDir, oldName, _newDir, newName)); 
    945917 
    946918        // there might be some more tests needed?! 
    947         if (_ns == NULL || _oldDir == NULL || _newDir == NULL 
    948                 || oldName == NULL || *oldName == '\0' 
    949                 || newName == NULL || *newName == '\0' 
    950                 || !strcmp(oldName, ".") || !strcmp(oldName, "..") 
     919        if (!strcmp(oldName, ".") || !strcmp(oldName, "..") 
    951920                || !strcmp(newName, ".") || !strcmp(newName, "..") 
    952921                || strchr(newName, '/') != NULL) 
    953922                RETURN_ERROR(B_BAD_VALUE); 
    954923 
    955         Volume *volume = (Volume *)_ns; 
     924        Volume *volume = (Volume *)_fs; 
    956925        Inode *oldDirectory = (Inode *)_oldDir; 
    957926        Inode *newDirectory = (Inode *)_newDir; 
     
    970939        RecursiveLocker locker(volume->Lock()); 
    971940 
    972         // get the directory's tree, and a pointer to the inode which should be changed 
     941        // Get the directory's tree, and a pointer to the inode which should be 
     942        // changed 
    973943        BPlusTree *tree; 
    974944        status = oldDirectory->GetTree(&tree); 
     
    1024994        } 
    1025995 
    1026         status = newTree->Insert(transaction, (const uint8 *)newName, strlen(newName), id); 
     996        status = newTree->Insert(transaction, (const uint8 *)newName, 
     997                strlen(newName), id); 
    1027998        if (status == B_NAME_IN_USE) { 
    1028999                // If there is already a file with that name, we have to remove 
    10291000                // it, as long it's not a directory with files in it 
    10301001                off_t clobber; 
    1031                 if (newTree->Find((const uint8 *)newName, strlen(newName), &clobber) < B_OK) 
     1002                if (newTree->Find((const uint8 *)newName, strlen(newName), &clobber) 
     1003                                < B_OK) 
    10321004                        return B_NAME_IN_USE; 
    10331005                if (clobber == id) 
     
    10391011                        return B_NAME_IN_USE; 
    10401012 
    1041                 status = newDirectory->Remove(transaction, newName, NULL, other->IsDirectory()); 
     1013                status = newDirectory->Remove(transaction, newName, NULL, 
     1014                        other->IsDirectory()); 
    10421015                if (status < B_OK) 
    10431016                        return status; 
    10441017 
    1045                 notify_entry_removed(volume->ID(), newDirectory->ID(), newName, clobber); 
    1046  
    1047                 status = newTree->Insert(transaction, (const uint8 *)newName, strlen(newName), id); 
     1018                notify_entry_removed(volume->ID(), newDirectory->ID(), newName, 
     1019                        clobber); 
     1020 
     1021                status = newTree->Insert(transaction, (const uint8 *)newName, 
     1022                        strlen(newName), id); 
    10481023        } 
    10491024        if (status < B_OK) 
     
    10661041 
    10671042        if (status == B_OK) { 
    1068                 status = tree->Remove(transaction, (const uint8 *)oldName, strlen(oldName), id); 
     1043                status = tree->Remove(transaction, (const uint8 *)oldName, 
     1044                        strlen(oldName), id); 
    10691045                if (status == B_OK) { 
    10701046                        inode->Parent() = newDirectory->BlockRun(); 
     
    10751051                        if (oldDirectory != newDirectory 
    10761052                                && inode->IsDirectory() 
    1077                                 && (status = inode->GetTree(&movedTree)) == B_OK) 
    1078                                 status = movedTree->Replace(transaction, (const uint8 *)"..", 2, newDirectory->ID()); 
     1053                                && (status = inode->GetTree(&movedTree)) == B_OK) { 
     1054                                status = movedTree->Replace(transaction, (const uint8 *)"..", 
     1055                                        2, newDirectory->ID()); 
     1056                        } 
    10791057 
    10801058                        if (status == B_OK) 
     
    10951073                        // Anyway, if we overwrote a file in the target directory 
    10961074                        // this is lost now (only in-memory, not on-disk)... 
    1097                         bailStatus = tree->Insert(transaction, (const uint8 *)oldName, strlen(oldName), id); 
    1098                         if (movedTree != NULL) 
    1099                                 movedTree->Replace(transaction, (const uint8 *)"..", 2, oldDirectory->ID()); 
     1075                        bailStatus = tree->Insert(transaction, (const uint8 *)oldName, 
     1076                                strlen(oldName), id); 
     1077                        if (movedTree != NULL) { 
     1078                                movedTree->Replace(transaction, (const uint8 *)"..", 2, 
     1079                                        oldDirectory->ID()); 
     1080                        } 
    11001081                } 
    11011082        } 
     
    11121093        } 
    11131094 
    1114         if (bailStatus == B_OK) 
    1115                 bailStatus = newTree->Remove(transaction, (const uint8 *)newName, strlen(newName), id); 
     1095        if (bailStatus == B_OK) { 
     1096                bailStatus = newTree->Remove(transaction, (const uint8 *)newName, 
     1097                        strlen(newName), id); 
     1098        } 
    11161099 
    11171100        if (bailStatus < B_OK) 
     
    11341117        if (inode->IsDirectory() && openMode & O_RWMASK) { 
    11351118                openMode = openMode & ~O_RWMASK; 
    1136                 // ToDo: for compatibility reasons, we don't return an error here... 
     1119                // TODO: for compatibility reasons, we don't return an error here... 
    11371120                // e.g. "copyattr" tries to do that 
    11381121                //return B_IS_A_DIRECTORY; 
     
    11441127                RETURN_ERROR(status); 
    11451128 
    1146         // we could actually use the cookie to keep track of: 
     1129        // We could actually use the cookie to keep track of: 
    11471130        //      - the last block_run 
    11481131        //      - the location in the data_stream (indirect, double indirect, 
     
    11861169 
    11871170static status_t 
    1188 bfs_read(void *_ns, void *_node, void *_cookie, off_t pos, void *buffer, 
     1171bfs_read(void *_fs, void *_node, void *_cookie, off_t pos, void *buffer, 
    11891172        size_t *_length) 
    11901173{ 
     
    12021185 
    12031186static status_t 
    1204 bfs_write(void *_ns, void *_node, void *_cookie, off_t pos, const void *buffer, 
     1187bfs_write(void *_fs, void *_node, void *_cookie, off_t pos, const void *buffer, 
    12051188        size_t *_length) 
    12061189{ 
    12071190        //FUNCTION(); 
    1208         Volume *volume = (Volume *)_ns; 
     1191        Volume *volume = (Volume *)_fs; 
    12091192        Inode *inode = (Inode *)_node; 
     1193 
     1194        if (volume->IsReadOnly()) 
     1195                return B_READ_ONLY_DEVICE; 
    12101196 
    12111197        if (!inode->HasUserAccessableStream()) { 
     
    12341220 
    12351221                // periodically notify if the file size has changed 
    1236                 // ToDo: should we better test for a change in the last_modified time only? 
     1222                // TODO: should we better test for a change in the last_modified time only? 
    12371223                if (!inode->IsDeleted() && cookie->last_size != inode->Size() 
    1238                         && system_time() > cookie->last_notification + INODE_NOTIFICATION_INTERVAL) { 
     1224                        && system_time() > cookie->last_notification 
     1225                                        + INODE_NOTIFICATION_INTERVAL) { 
    12391226                        notify_stat_changed(volume->ID(), inode->ID(), 
    12401227                                B_STAT_MODIFICATION_TIME | B_STAT_SIZE | B_STAT_INTERIM_UPDATE); 
     
    12481235 
    12491236 
    1250 /**     Do whatever is necessary to close a file, EXCEPT for freeing 
    1251  *      the cookie! 
    1252  */ 
    1253  
    1254 static status_t 
    1255 bfs_close(void *_ns, void *_node, void *_cookie) 
    1256 { 
    1257         FUNCTION(); 
    1258         if (_ns == NULL || _node == NULL || _cookie == NULL) 
    1259                 return B_BAD_VALUE; 
    1260  
    1261         return B_OK; 
    1262 } 
    1263  
    1264  
    1265 static status_t 
    1266 bfs_free_cookie(void *_ns, void *_node, void *_cookie) 
    1267 { 
    1268         FUNCTION(); 
    1269  
    1270         if (_ns == NULL || _node == NULL || _cookie == NULL) 
    1271                 return B_BAD_VALUE; 
     1237static status_t 
     1238bfs_close(void *_fs, void *_node, void *_cookie) 
     1239{ 
     1240        FUNCTION(); 
     1241        return B_OK; 
     1242} 
     1243 
     1244 
     1245static status_t 
     1246bfs_free_cookie(void *_fs, void *_node, void *_cookie) 
     1247{ 
     1248        FUNCTION(); 
    12721249 
    12731250        file_cookie *cookie = (file_cookie *)_cookie; 
    1274         Volume *volume = (Volume *)_ns; 
     1251        Volume *volume = (Volume *)_fs; 
    12751252        Inode *inode = (Inode *)_node; 
    12761253 
    12771254        Transaction transaction; 
    1278         bool needsTrimming; 
    1279  
    1280         { 
     1255        bool needsTrimming = false; 
     1256 
     1257        if (!volume->IsReadOnly()) { 
    12811258                ReadLocked locker(inode->Lock()); 
    12821259                needsTrimming = inode->NeedsTrimming(); 
     
    12921269        } 
    12931270 
    1294         WriteLocked locker(inode->Lock()); 
    12951271        status_t status = transaction.IsStarted() ? B_OK : B_ERROR; 
    12961272 
    12971273        if (status == B_OK) { 
     1274                WriteLocked locker(inode->Lock()); 
     1275 
    12981276                // trim the preallocated blocks and update the size, 
    12991277                // and last_modified indices if needed 
     
    13431321 
    13441322 
    1345 /**     Checks access permissions, return B_NOT_ALLOWED if the action 
    1346  *      is not allowed. 
    1347  */ 
    1348  
    1349 static status_t 
    1350 bfs_access(void *_ns, void *_node, int accessMode) 
     1323/*!     Checks access permissions, return B_NOT_ALLOWED if the action 
     1324        is not allowed. 
     1325*/