]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - mm/shmem.c
ipv6: check for ip6_null_entry in __ip6_del_rt_siblings()
[karo-tx-linux.git] / mm / shmem.c
index 9c6d22ff44e26280505729463acaa96e8bf88d6a..a26649a6633fbfd8e81296d27bdfe8c812079cf1 100644 (file)
@@ -1908,8 +1908,9 @@ static int synchronous_wake_function(wait_queue_t *wait, unsigned mode, int sync
        return ret;
 }
 
-static int shmem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
+static int shmem_fault(struct vm_fault *vmf)
 {
+       struct vm_area_struct *vma = vmf->vma;
        struct inode *inode = file_inode(vma->vm_file);
        gfp_t gfp = mapping_gfp_mask(inode->i_mapping);
        enum sgp_type sgp;
@@ -2330,7 +2331,7 @@ shmem_write_begin(struct file *file, struct address_space *mapping,
        pgoff_t index = pos >> PAGE_SHIFT;
 
        /* i_mutex is held by caller */
-       if (unlikely(info->seals)) {
+       if (unlikely(info->seals & (F_SEAL_WRITE | F_SEAL_GROW))) {
                if (info->seals & F_SEAL_WRITE)
                        return -EPERM;
                if ((info->seals & F_SEAL_GROW) && pos + len > inode->i_size)