diff options
author | Björn Jacke <bj@sernet.de> | 2010-06-09 15:24:26 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2010-06-18 08:33:30 +0200 |
commit | bf543a1372bbb3aada53e0bd249ba52209cc07cd (patch) | |
tree | c1dacf5f1416d775ea6fe0e31f758a4acb5cbfd5 | |
parent | 3e2a38d6ebdbfad1e7b6d6f86dfa85cd1f591e89 (diff) | |
download | samba-bf543a1372bbb3aada53e0bd249ba52209cc07cd.tar.gz samba-bf543a1372bbb3aada53e0bd249ba52209cc07cd.tar.xz samba-bf543a1372bbb3aada53e0bd249ba52209cc07cd.zip |
s3: fix calculation of st_blocks in streams_xattr
Thanks to Joachim Schmitz for finding that miscalculation.
(cherry picked from commit 6a6bb768c6542d738a8b2b6da282159a65ed611d)
Fix bug #7503 (vfs_stream_xattr calculates st_blocks wrong).
(cherry picked from commit 3f8a03cfdaa29e54b50738df4e7b782228e2d931)
-rw-r--r-- | source3/modules/vfs_streams_xattr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c index d7c0a834c00..3f7407a604c 100644 --- a/source3/modules/vfs_streams_xattr.c +++ b/source3/modules/vfs_streams_xattr.c @@ -237,7 +237,7 @@ static int streams_xattr_fstat(vfs_handle_struct *handle, files_struct *fsp, sbuf->st_ex_ino = stream_inode(sbuf, io->xattr_name); sbuf->st_ex_mode &= ~S_IFMT; sbuf->st_ex_mode |= S_IFREG; - sbuf->st_ex_blocks = sbuf->st_ex_size % STAT_ST_BLOCKSIZE + 1; + sbuf->st_ex_blocks = sbuf->st_ex_size / STAT_ST_BLOCKSIZE + 1; return 0; } @@ -290,7 +290,7 @@ static int streams_xattr_stat(vfs_handle_struct *handle, smb_fname->st.st_ex_mode &= ~S_IFMT; smb_fname->st.st_ex_mode |= S_IFREG; smb_fname->st.st_ex_blocks = - smb_fname->st.st_ex_size % STAT_ST_BLOCKSIZE + 1; + smb_fname->st.st_ex_size / STAT_ST_BLOCKSIZE + 1; result = 0; fail: @@ -341,7 +341,7 @@ static int streams_xattr_lstat(vfs_handle_struct *handle, smb_fname->st.st_ex_mode &= ~S_IFMT; smb_fname->st.st_ex_mode |= S_IFREG; smb_fname->st.st_ex_blocks = - smb_fname->st.st_ex_size % STAT_ST_BLOCKSIZE + 1; + smb_fname->st.st_ex_size / STAT_ST_BLOCKSIZE + 1; result = 0; |