The reference count on tlink can only be decremented if
cifs_sb_tlink(cifs_sb) was used to acquire it. That only
happens if open_file==NULL.

Cc: Steve French <sfre...@samba.org>
Cc: Jeff Layton <jlay...@redhat.com>
Cc: Dean Gehnert <de...@tpi.com>
Signed-off-by: Tim Gardner <t...@tpi.com>
---

V2 - this is a new patch in the V2 series.

 fs/cifs/inode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 3f710c6..e332038 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -2007,7 +2007,7 @@ cifs_set_file_size(struct inode *inode, struct iattr 
*attrs,
                        CIFSSMBClose(xid, tcon, netfid);
                }
        }
-       if (tlink)
+       if (!open_file)
                cifs_put_tlink(tlink);
 
 set_size_out:
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to