Re: [PATCH 3/3] cifs: don't allow mmap'ed pages to be dirtied while under writeback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 27 Mar 2011 23:13:45 +0400
Pavel Shilovsky <piastryyy@xxxxxxxxx> wrote:


> > Âint cifs_file_strict_mmap(struct file *file, struct vm_area_struct *vma)
> > Â{
> > Â Â Â Âint rc, xid;
> > @@ -1920,6 +1918,7 @@ int cifs_file_strict_mmap(struct file *file, struct vm_area_struct *vma)
> > Â Â Â Â Â Â Â Âcifs_invalidate_mapping(inode);
> >
> > Â Â Â Ârc = generic_file_mmap(file, vma);
> > + Â Â Â vma->vm_ops = &cifs_file_vm_ops;
> 
> May be we should set this only if generic_file_mmap succeed and rc == 0?
> 

I don't think it really matters but you're probably right that it won't
hurt to do so. All of the existing callers of generic_file_mmap that
set the vm_ops don't do it unless generic_file_mmap succeeds. I'll
respin it...

-- 
Jeff Layton <jlayton@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux