NFS: Make opened as optional argument in _nfs4_do_open
authorKinglong Mee <kinglongmee@gmail.com>
Wed, 26 Aug 2015 13:11:39 +0000 (21:11 +0800)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 27 Aug 2015 23:44:38 +0000 (19:44 -0400)
Check opened, only update it when non-NULL.
It's not needs define an unused value for the opened
when calling _nfs4_do_open.

v3, same as v2.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/nfs4file.c
fs/nfs/nfs4proc.c

index dcd39d4..43f1590 100644 (file)
@@ -27,7 +27,6 @@ nfs4_file_open(struct inode *inode, struct file *filp)
        struct inode *dir;
        unsigned openflags = filp->f_flags;
        struct iattr attr;
-       int opened = 0;
        int err;
 
        /*
@@ -66,7 +65,7 @@ nfs4_file_open(struct inode *inode, struct file *filp)
                nfs_sync_inode(inode);
        }
 
-       inode = NFS_PROTO(dir)->open_context(dir, ctx, openflags, &attr, &opened);
+       inode = NFS_PROTO(dir)->open_context(dir, ctx, openflags, &attr, NULL);
        if (IS_ERR(inode)) {
                err = PTR_ERR(inode);
                switch (err) {
Simple merge