mirror of
https://github.com/versity/scoutfs.git
synced 2026-08-18 21:26:51 +00:00
scoutfs: Tidy some enum usage
Prefer named to anonymous enums. This helps readability a little. Use enum as param type if possible (a couple spots). Remove unused enum in lock_server.c. Define enum spbm_flags using shift notation for consistency. Rename get_file_block()'s "gfb" parameter to "flags" for consistency. Signed-off-by: Andy Grover <agrover@versity.com>
This commit is contained in:
+3
-3
@@ -78,7 +78,7 @@ static unsigned int mode_to_type(umode_t mode)
|
||||
#undef S_SHIFT
|
||||
}
|
||||
|
||||
static unsigned int dentry_type(unsigned int type)
|
||||
static unsigned int dentry_type(enum scoutfs_dentry_type type)
|
||||
{
|
||||
static unsigned char types[] = {
|
||||
[SCOUTFS_DT_FIFO] = DT_FIFO,
|
||||
@@ -988,12 +988,12 @@ static void init_symlink_key(struct scoutfs_key *key, u64 ino, u8 nr)
|
||||
* The target name can be null for deletion when val isn't used. Size
|
||||
* still has to be provided to determine the number of items.
|
||||
*/
|
||||
enum {
|
||||
enum symlink_ops {
|
||||
SYM_CREATE = 0,
|
||||
SYM_LOOKUP,
|
||||
SYM_DELETE,
|
||||
};
|
||||
static int symlink_item_ops(struct super_block *sb, int op, u64 ino,
|
||||
static int symlink_item_ops(struct super_block *sb, enum symlink_ops op, u64 ino,
|
||||
struct scoutfs_lock *lock, const char *target,
|
||||
size_t size)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user