diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/ocfs2/dlmfs/dlmfs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c index 1b0de157a08c..a99d1eafa8e2 100644 --- a/fs/ocfs2/dlmfs/dlmfs.c +++ b/fs/ocfs2/dlmfs/dlmfs.c | |||
| @@ -112,20 +112,20 @@ MODULE_PARM_DESC(capabilities, DLMFS_CAPABILITIES); | |||
| 112 | * O_RDONLY -> PRMODE level | 112 | * O_RDONLY -> PRMODE level |
| 113 | * O_WRONLY -> EXMODE level | 113 | * O_WRONLY -> EXMODE level |
| 114 | * | 114 | * |
| 115 | * O_NONBLOCK -> LKM_NOQUEUE | 115 | * O_NONBLOCK -> NOQUEUE |
| 116 | */ | 116 | */ |
| 117 | static int dlmfs_decode_open_flags(int open_flags, | 117 | static int dlmfs_decode_open_flags(int open_flags, |
| 118 | int *level, | 118 | int *level, |
| 119 | int *flags) | 119 | int *flags) |
| 120 | { | 120 | { |
| 121 | if (open_flags & (O_WRONLY|O_RDWR)) | 121 | if (open_flags & (O_WRONLY|O_RDWR)) |
| 122 | *level = LKM_EXMODE; | 122 | *level = DLM_LOCK_EX; |
| 123 | else | 123 | else |
| 124 | *level = LKM_PRMODE; | 124 | *level = DLM_LOCK_PR; |
| 125 | 125 | ||
| 126 | *flags = 0; | 126 | *flags = 0; |
| 127 | if (open_flags & O_NONBLOCK) | 127 | if (open_flags & O_NONBLOCK) |
| 128 | *flags |= LKM_NOQUEUE; | 128 | *flags |= DLM_LKF_NOQUEUE; |
| 129 | 129 | ||
| 130 | return 0; | 130 | return 0; |
| 131 | } | 131 | } |
| @@ -166,7 +166,7 @@ static int dlmfs_file_open(struct inode *inode, | |||
| 166 | * to be able userspace to be able to distinguish a | 166 | * to be able userspace to be able to distinguish a |
| 167 | * valid lock request from one that simply couldn't be | 167 | * valid lock request from one that simply couldn't be |
| 168 | * granted. */ | 168 | * granted. */ |
| 169 | if (flags & LKM_NOQUEUE && status == -EAGAIN) | 169 | if (flags & DLM_LKF_NOQUEUE && status == -EAGAIN) |
| 170 | status = -ETXTBSY; | 170 | status = -ETXTBSY; |
| 171 | kfree(fp); | 171 | kfree(fp); |
| 172 | goto bail; | 172 | goto bail; |
| @@ -193,7 +193,7 @@ static int dlmfs_file_release(struct inode *inode, | |||
| 193 | status = 0; | 193 | status = 0; |
| 194 | if (fp) { | 194 | if (fp) { |
| 195 | level = fp->fp_lock_level; | 195 | level = fp->fp_lock_level; |
| 196 | if (level != LKM_IVMODE) | 196 | if (level != DLM_LOCK_IV) |
| 197 | user_dlm_cluster_unlock(&ip->ip_lockres, level); | 197 | user_dlm_cluster_unlock(&ip->ip_lockres, level); |
| 198 | 198 | ||
| 199 | kfree(fp); | 199 | kfree(fp); |
