Created
April 22, 2013 19:39
-
-
Save ctdk/5437849 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int xiafs_rename(struct inode * old_dir, const char * old_name, int old_len, | |
struct inode * new_dir, const char * new_name, int new_len, | |
int must_be_dir) | |
{ | |
/* TODO: Come back and fix race condition stuff */ | |
static struct wait_queue_head_t * wait = NULL; | |
static int lock = 0; | |
int result; | |
while (lock) | |
sleep_on(wait); | |
lock = 1; | |
result = do_xiafs_rename(old_dir, old_name, old_len, | |
new_dir, new_name, new_len, | |
must_be_dir); | |
lock = 0; | |
wake_up(wait); | |
return result; | |
} | |
------ | |
CC [M] /home/jeremy/linux-dev/xiafs/xiafs-module/namei.o | |
/home/jeremy/linux-dev/xiafs/xiafs-module/namei.c: In function ‘xiafs_rename’: | |
/home/jeremy/linux-dev/xiafs/xiafs-module/namei.c:846: warning: passing argument 1 of ‘sleep_on’ from incompatible pointer type | |
include/linux/wait.h:430: note: expected ‘struct wait_queue_head_t *’ but argument is of type ‘struct wait_queue_head_t *’ | |
/home/jeremy/linux-dev/xiafs/xiafs-module/namei.c:852: warning: passing argument 1 of ‘__wake_up’ from incompatible pointer type | |
include/linux/wait.h:142: note: expected ‘struct wait_queue_head_t *’ but argument is of type ‘struct wait_queue_head_t *’ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment