1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

s3: fix calculation of st_blocks in streams_xattr

Thanks to Joachim Schmitz for finding that miscalculation.
This commit is contained in:
Björn Jacke 2010-06-09 15:24:26 +02:00
parent 687c42ee65
commit 6a6bb768c6

View File

@ -238,7 +238,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;
}
@ -291,7 +291,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:
@ -342,7 +342,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;