diff options
author | David S. Miller <davem@davemloft.net> | 2010-05-12 03:05:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-12 03:05:35 -0400 |
commit | 278554bd6579206921f5d8a523649a7a57f8850d (patch) | |
tree | 4e6c527daf0910e455b3aa72e2c96b0479e430be /fs/ocfs2/dlmfs/dlmfs.c | |
parent | 5a147e8bf982f9dd414c1dd751fe02c1942506b2 (diff) | |
parent | cea0d767c29669bf89f86e4aee46ef462d2ebae8 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/net/wireless/ath/ar9170/usb.c
drivers/scsi/iscsi_tcp.c
net/ipv4/ipmr.c
Diffstat (limited to 'fs/ocfs2/dlmfs/dlmfs.c')
-rw-r--r-- | fs/ocfs2/dlmfs/dlmfs.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c index 1b0de157a08c..b83d6107a1f5 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); |
@@ -262,7 +262,7 @@ static ssize_t dlmfs_file_read(struct file *filp, | |||
262 | if ((count + *ppos) > i_size_read(inode)) | 262 | if ((count + *ppos) > i_size_read(inode)) |
263 | readlen = i_size_read(inode) - *ppos; | 263 | readlen = i_size_read(inode) - *ppos; |
264 | else | 264 | else |
265 | readlen = count - *ppos; | 265 | readlen = count; |
266 | 266 | ||
267 | lvb_buf = kmalloc(readlen, GFP_NOFS); | 267 | lvb_buf = kmalloc(readlen, GFP_NOFS); |
268 | if (!lvb_buf) | 268 | if (!lvb_buf) |