staging/lustre: Get rid of inode_dio_write_done and inode_dio_read
authorOleg Drokin <green@linuxhacker.ru>
Fri, 31 Jul 2015 23:42:59 +0000 (19:42 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Aug 2015 00:48:17 +0000 (17:48 -0700)
These primitives are long deprecated and unused.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
drivers/staging/lustre/lustre/llite/llite_lib.c
drivers/staging/lustre/lustre/llite/vvp_io.c

index 157bafb08a5bae7d0a70f9bc7f680dcefed31715..6b14406b2920daa640b68f6b80f01cba0fa68aa8 100644 (file)
 
 #define LTIME_S(time)             (time.tv_sec)
 
-/* inode_dio_wait(i) use as-is for write lock */
-# define inode_dio_write_done(i)       do {} while (0) /* for write unlock */
-# define inode_dio_read(i)             atomic_inc(&(i)->i_dio_count)
-/* inode_dio_done(i) use as-is for read unlock */
-
 #ifndef QUOTA_OK
 # define QUOTA_OK 0
 #endif
index 39f0b2a07aecaf796440a4a1986ce7a151b801f0..55e2dc6c1fbf9c23be716bf3f5f0b9da5e5eb7c0 100644 (file)
@@ -1356,11 +1356,8 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)
        if (!op_data)
                return -ENOMEM;
 
-       if (!S_ISDIR(inode->i_mode)) {
-               if (attr->ia_valid & ATTR_SIZE)
-                       inode_dio_write_done(inode);
+       if (!S_ISDIR(inode->i_mode))
                mutex_unlock(&inode->i_mutex);
-       }
 
        memcpy(&op_data->op_attr, attr, sizeof(*attr));
 
index 91bba79678cf7da1f1cd303c114648ea76c8e53d..a659962e09c8a49146b80ac74a4ad13356cfa2cb 100644 (file)
@@ -455,12 +455,11 @@ static void vvp_io_setattr_end(const struct lu_env *env,
        struct cl_io *io    = ios->cis_io;
        struct inode *inode = ccc_object_inode(io->ci_obj);
 
-       if (cl_io_is_trunc(io)) {
+       if (cl_io_is_trunc(io))
                /* Truncate in memory pages - they must be clean pages
                 * because osc has already notified to destroy osc_extents. */
                vvp_do_vmtruncate(inode, io->u.ci_setattr.sa_attr.lvb_size);
-               inode_dio_write_done(inode);
-       }
+
        mutex_unlock(&inode->i_mutex);
 }