fs: clean up after mandatory file locking support removal
[sfrench/cifs-2.6.git] / fs / read_write.c
index ffe821b8588e28e1758ca4febe340cf0ecc441a1..af057c57bdc6447177bfc03e276ba2cd63bd9401 100644 (file)
@@ -365,12 +365,8 @@ out_putf:
 
 int rw_verify_area(int read_write, struct file *file, const loff_t *ppos, size_t count)
 {
-       struct inode *inode;
-       int retval = -EINVAL;
-
-       inode = file_inode(file);
        if (unlikely((ssize_t) count < 0))
-               return retval;
+               return -EINVAL;
 
        /*
         * ranged mandatory locking does not apply to streams - it makes sense
@@ -381,12 +377,12 @@ int rw_verify_area(int read_write, struct file *file, const loff_t *ppos, size_t
 
                if (unlikely(pos < 0)) {
                        if (!unsigned_offsets(file))
-                               return retval;
+                               return -EINVAL;
                        if (count >= -pos) /* both values are in 0..LLONG_MAX */
                                return -EOVERFLOW;
                } else if (unlikely((loff_t) (pos + count) < 0)) {
                        if (!unsigned_offsets(file))
-                               return retval;
+                               return -EINVAL;
                }
        }