]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/staging/pohmelfs/inode.c
pohmelfs: Use __generic_file_aio_write instead of generic_file_aio_write_nolock
[karo-tx-linux.git] / drivers / staging / pohmelfs / inode.c
index b2eaf90472660d6a0c95d5ffa138f5fc046a5f53..e9d41e439aa734049a28c04a5feea29a8d50d451 100644 (file)
@@ -386,7 +386,7 @@ static int pohmelfs_write_inode_create_children(struct inode *inode)
                if (inode && (inode->i_state & I_DIRTY)) {
                        struct pohmelfs_inode *pi = POHMELFS_I(inode);
                        pohmelfs_write_create_inode(pi);
-                       //pohmelfs_meta_command(pi, NETFS_INODE_INFO, 0, NULL, NULL, 0);
+                       /* pohmelfs_meta_command(pi, NETFS_INODE_INFO, 0, NULL, NULL, 0); */
                        iput(inode);
                }
        }
@@ -845,7 +845,7 @@ static void pohmelfs_destroy_inode(struct inode *inode)
        struct pohmelfs_sb *psb = POHMELFS_SB(sb);
        struct pohmelfs_inode *pi = POHMELFS_I(inode);
 
-       //pohmelfs_data_unlock(pi, 0, inode->i_size, POHMELFS_READ_LOCK);
+       /* pohmelfs_data_unlock(pi, 0, inode->i_size, POHMELFS_READ_LOCK); */
 
        pohmelfs_inode_del_inode(psb, pi);
 
@@ -921,7 +921,7 @@ ssize_t pohmelfs_write(struct file *file, const char __user *buf,
        if (ret)
                goto err_out_unlock;
 
-       ret = generic_file_aio_write_nolock(&kiocb, &iov, 1, pos);
+       ret = __generic_file_aio_write(&kiocb, &iov, 1, &kiocb.ki_pos);
        *ppos = kiocb.ki_pos;
 
        mutex_unlock(&inode->i_mutex);
@@ -943,7 +943,7 @@ err_out_unlock:
        return ret;
 }
 
-const static struct file_operations pohmelfs_file_ops = {
+static const struct file_operations pohmelfs_file_ops = {
        .open           = generic_file_open,
        .fsync          = pohmelfs_fsync,
 
@@ -1529,9 +1529,9 @@ static void pohmelfs_drop_scan(struct work_struct *work)
        struct pohmelfs_inode *pi;
        unsigned int count = 0;
 
-       while ((pi = pohmelfs_get_inode_from_list(psb, &psb->drop_list, &count))) {
+       while ((pi = pohmelfs_get_inode_from_list(psb, &psb->drop_list, &count)))
                pohmelfs_put_inode_count(pi, count);
-       }
+
        pohmelfs_check_states(psb);
 
        if (psb->drop_scan_timeout)
@@ -1568,9 +1568,8 @@ static void pohmelfs_trans_scan_state(struct netfs_state *st)
                rb_node = rb_next(rb_node);
 
                err = -ETIMEDOUT;
-               if (timeout && (++dst->retries < psb->trans_retries)) {
+               if (timeout && (++dst->retries < psb->trans_retries))
                        err = netfs_trans_resend(t, psb);
-               }
 
                if (err || (t->flags & NETFS_TRANS_SINGLE_DST)) {
                        if (netfs_trans_remove_nolock(dst, st))
@@ -1777,7 +1776,7 @@ static int pohmelfs_show_stats(struct seq_file *m, struct vfsmount *mnt)
                seq_printf(m, "%u ", ctl->idx);
                if (ctl->addr.sa_family == AF_INET) {
                        struct sockaddr_in *sin = (struct sockaddr_in *)&st->ctl.addr;
-                       //seq_printf(m, "%pi4:%u", &sin->sin_addr.s_addr, ntohs(sin->sin_port));
+                       /* seq_printf(m, "%pi4:%u", &sin->sin_addr.s_addr, ntohs(sin->sin_port)); */
                        seq_printf(m, "%u.%u.%u.%u:%u", NIPQUAD(sin->sin_addr.s_addr), ntohs(sin->sin_port));
                } else if (ctl->addr.sa_family == AF_INET6) {
                        struct sockaddr_in6 *sin = (struct sockaddr_in6 *)&st->ctl.addr;
@@ -1951,14 +1950,7 @@ static int pohmelfs_get_sb(struct file_system_type *fs_type,
  */
 static void pohmelfs_kill_super(struct super_block *sb)
 {
-       struct writeback_control wbc = {
-               .sync_mode      = WB_SYNC_ALL,
-               .range_start    = 0,
-               .range_end      = LLONG_MAX,
-               .nr_to_write    = LONG_MAX,
-       };
-       generic_sync_sb_inodes(sb, &wbc);
-
+       sync_inodes_sb(sb);
        kill_anon_super(sb);
 }