[Devel] [PATCH RHEL7 COMMIT] fuse: Revert "fuse: report size from server if no openers exist"

Konstantin Khorenko khorenko at virtuozzo.com
Tue Jul 10 19:01:29 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-862.6.3.vz7.62.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.6.3.vz7.62.2
------>
commit c3e5f43de78c58c600e9ce33f870484bc982cefd
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Tue Jul 10 19:01:29 2018 +0300

    fuse: Revert "fuse: report size from server if no openers exist"
    
    This reverts commit dee8f9cf51ec5c26f771475ae73176904d6fc830.
    
    The patch is not needed anymore (actually noop) after this fix:
    0dd16f58f669 ("fuse: trust server file size unless opened")
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    Reviewed-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
---
 fs/fuse/dir.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 03fe07260c13..66eff240cbb6 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1003,12 +1003,8 @@ static int fuse_do_getattr(struct inode *inode, struct kstat *stat,
 					       attr_version);
 			if (get_size_form_attr)
 				stat->size = outarg.attr.size;
-			else if (stat) {
-				struct fuse_inode *fi = get_fuse_inode(inode);
+			else if (stat)
 				fuse_fillattr(inode, &outarg.attr, stat);
-				if (!atomic_read(&fi->num_openers))
-					stat->size = outarg.attr.size;
-			}
 		}
 	}
 	return err;


More information about the Devel mailing list