fs/unionfs/: Use SEEK_{SET,CUR} instead of hardcoded values
authorJosef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Sun, 25 Feb 2007 22:32:46 +0000 (17:32 -0500)
committerErez Zadok <ezk@cs.sunysb.edu>
Sun, 6 Mar 2011 08:42:02 +0000 (03:42 -0500)
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
fs/unionfs/dirfops.c

index 2b77fa9c05ef5ffd1b4bc4a98bf0312aee021dfd..8f568c77334a15208380c1139092315f888afdfe 100644 (file)
@@ -135,15 +135,15 @@ static int unionfs_readdir(struct file *file, void *dirent, filldir_t filldir)
                buf.sb = inode->i_sb;
 
                /* Read starting from where we last left off. */
-               offset = vfs_llseek(hidden_file, uds->dirpos, 0);
+               offset = vfs_llseek(hidden_file, uds->dirpos, SEEK_SET);
                if (offset < 0) {
                        err = offset;
                        goto out;
                }
                err = vfs_readdir(hidden_file, unionfs_filldir, &buf);
-               /* Save the position for when we continue. */
 
-               offset = vfs_llseek(hidden_file, 0, 1);
+               /* Save the position for when we continue. */
+               offset = vfs_llseek(hidden_file, 0, SEEK_CUR);
                if (offset < 0) {
                        err = offset;
                        goto out;