1. A machine-implemented method, comprising: receiving a request to perform a file system operation, wherein performance of said file system operation requires performance of a plurality of database operations involving one or more resources; to perform said file system operation, obtaining a first set of locks that apply to said one or more resources, wherein each lock in said first set of locks is a first type of lock; performing said plurality of database operations in a plurality of database transactions; for each database transaction of said plurality of transactions, obtaining a second set of locks on the resources, of said one or more resources, that are involved in database operations that will be performed during said database transaction, wherein each lock in said second set of locks is a second type of lock; releasing locks of said second type of lock in response to successful completion of the corresponding database transaction; and releasing locks of said first type of lock in response to successful completion of said file system operation.