]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: flush data on any setattr
authorJeff Layton <jlayton@redhat.com>
Thu, 26 Mar 2009 17:35:37 +0000 (13:35 -0400)
committerSteve French <sfrench@us.ibm.com>
Fri, 17 Apr 2009 01:26:48 +0000 (01:26 +0000)
commit9a3338308528d28f8f6f8338f6269def27c1e0e8
treeb71dbcddf45eee405ea9bb615ef621b9a09a9994
parented1a6d4159ba186c5006328a7f9297bb40da111b
cifs: flush data on any setattr

We already flush all the dirty pages for an inode before doing
ATTR_SIZE and ATTR_MTIME changes. There's another problem though -- if
we change the mode so that the file becomes read-only then we may not
be able to write data to it after a reconnect.

Fix this by just going back to flushing all the dirty data on any
setattr call. There are probably some cases that can be optimized out,
but I'm not sure they're worthwhile and we need to consider them more
carefully to make sure that we don't cause regressions if we have
to reconnect before writeback occurs.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/inode.c