aboutsummaryrefslogtreecommitdiffstats
path: root/fs/read_write.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/read_write.c')
-rw-r--r--fs/read_write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/read_write.c b/fs/read_write.c
index bcb0ef2aae3d..1f8dc373ede7 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -197,13 +197,13 @@ int rw_verify_area(int read_write, struct file *file, loff_t *ppos, size_t count
197 struct inode *inode; 197 struct inode *inode;
198 loff_t pos; 198 loff_t pos;
199 199
200 inode = file->f_path.dentry->d_inode;
200 if (unlikely((ssize_t) count < 0)) 201 if (unlikely((ssize_t) count < 0))
201 goto Einval; 202 goto Einval;
202 pos = *ppos; 203 pos = *ppos;
203 if (unlikely((pos < 0) || (loff_t) (pos + count) < 0)) 204 if (unlikely((pos < 0) || (loff_t) (pos + count) < 0))
204 goto Einval; 205 goto Einval;
205 206
206 inode = file->f_path.dentry->d_inode;
207 if (unlikely(inode->i_flock && MANDATORY_LOCK(inode))) { 207 if (unlikely(inode->i_flock && MANDATORY_LOCK(inode))) {
208 int retval = locks_mandatory_area( 208 int retval = locks_mandatory_area(
209 read_write == READ ? FLOCK_VERIFY_READ : FLOCK_VERIFY_WRITE, 209 read_write == READ ? FLOCK_VERIFY_READ : FLOCK_VERIFY_WRITE,