fuse: Convert to new freezing mechanism
authorJan Kara <jack@suse.cz>
Tue, 12 Jun 2012 14:20:42 +0000 (16:20 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 31 Jul 2012 05:45:50 +0000 (09:45 +0400)
Convert check in fuse_file_aio_write() to using new freeze protection.

CC: fuse-devel@lists.sourceforge.net
CC: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/fuse/file.c

index b321a688cde79aa0f2923f3440330d03f0e5ee1e..93d8d6c9494dbd5737b0842a3ebb55ef972e0d87 100644 (file)
@@ -944,9 +944,8 @@ static ssize_t fuse_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
                return err;
 
        count = ocount;
-
+       sb_start_write(inode->i_sb);
        mutex_lock(&inode->i_mutex);
-       vfs_check_frozen(inode->i_sb, SB_FREEZE_WRITE);
 
        /* We can write back this queue in page reclaim */
        current->backing_dev_info = mapping->backing_dev_info;
@@ -1004,6 +1003,7 @@ static ssize_t fuse_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
 out:
        current->backing_dev_info = NULL;
        mutex_unlock(&inode->i_mutex);
+       sb_end_write(inode->i_sb);
 
        return written ? written : err;
 }