]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/btrfs/file.c
Merge tag 'md/4.3-rc6-fixes' of git://neil.brown.name/md
[karo-tx-linux.git] / fs / btrfs / file.c
index 795d754327a7277de47d13e0f1426aaa5c7fd85c..8c6f247ba81d4e84c6a7d3d00d0348c974c1b049 100644 (file)
@@ -1748,7 +1748,7 @@ static ssize_t btrfs_file_write_iter(struct kiocb *iocb,
        }
 
        current->backing_dev_info = inode_to_bdi(inode);
-       err = file_remove_suid(file);
+       err = file_remove_privs(file);
        if (err) {
                mutex_unlock(&inode->i_mutex);
                goto out;
@@ -2584,7 +2584,7 @@ static long btrfs_fallocate(struct file *file, int mode,
                                        alloc_start);
                if (ret)
                        goto out;
-       } else {
+       } else if (offset + len > inode->i_size) {
                /*
                 * If we are fallocating from the end of the file onward we
                 * need to zero out the end of the page if i_size lands in the