ima: re-initialize IMA policy LSM info
[firefly-linux-kernel-4.4.55.git] / fs / gfs2 / file.c
index e056b4ce487777bbe794d64a11e4cbe2756205d3..991ab2d484dd888e9432dd66ecee92247e16fac9 100644 (file)
@@ -44,7 +44,7 @@
  * gfs2_llseek - seek to a location in a file
  * @file: the file
  * @offset: the offset
- * @origin: Where to seek from (SEEK_SET, SEEK_CUR, or SEEK_END)
+ * @whence: Where to seek from (SEEK_SET, SEEK_CUR, or SEEK_END)
  *
  * SEEK_END requires the glock for the file because it references the
  * file's size.
  * Returns: The new offset, or errno
  */
 
-static loff_t gfs2_llseek(struct file *file, loff_t offset, int origin)
+static loff_t gfs2_llseek(struct file *file, loff_t offset, int whence)
 {
        struct gfs2_inode *ip = GFS2_I(file->f_mapping->host);
        struct gfs2_holder i_gh;
        loff_t error;
 
-       switch (origin) {
+       switch (whence) {
        case SEEK_END: /* These reference inode->i_size */
        case SEEK_DATA:
        case SEEK_HOLE:
                error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY,
                                           &i_gh);
                if (!error) {
-                       error = generic_file_llseek(file, offset, origin);
+                       error = generic_file_llseek(file, offset, whence);
                        gfs2_glock_dq_uninit(&i_gh);
                }
                break;
        case SEEK_CUR:
        case SEEK_SET:
-               error = generic_file_llseek(file, offset, origin);
+               error = generic_file_llseek(file, offset, whence);
                break;
        default:
                error = -EINVAL;
@@ -432,7 +432,7 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
        if (ret)
                goto out_unlock;
        gfs2_write_calc_reserv(ip, PAGE_CACHE_SIZE, &data_blocks, &ind_blocks);
-       ret = gfs2_inplace_reserve(ip, data_blocks + ind_blocks);
+       ret = gfs2_inplace_reserve(ip, data_blocks + ind_blocks, 0);
        if (ret)
                goto out_quota_unlock;
 
@@ -825,7 +825,7 @@ static long gfs2_fallocate(struct file *file, int mode, loff_t offset,
 retry:
                gfs2_write_calc_reserv(ip, bytes, &data_blocks, &ind_blocks);
 
-               error = gfs2_inplace_reserve(ip, data_blocks + ind_blocks);
+               error = gfs2_inplace_reserve(ip, data_blocks + ind_blocks, 0);
                if (error) {
                        if (error == -ENOSPC && bytes > sdp->sd_sb.sb_bsize) {
                                bytes >>= 1;